Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Renaming the multiple files in a directory..

Status
Not open for further replies.

vrs1008

Programmer
Sep 16, 2003
62
US
Hi,

I have 2000 files in the folder.

All the file names have different numbers of characters and with the extension ".oo.ppo".

I want to change the extension for all the files to "_mo_gpo" keeping the same file name.

Any suggestion...

Regards,
Vibhav1008
 
Something like this:

Code:
cd /directory 
find . -name '*.oo.ppo' | while read f
do
    echo mv $f $(basename $f .oo.ppo)_mo_gpo
done

Take out the echo if the resulting commands look right.

Annihilannic.
 
Thanks my frnd..

It worked...

Regards,
Vibhav1008
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top