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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rename many files one command at dos command prompt

Status
Not open for further replies.

jwkolker

Programmer
Jan 9, 2003
68
0
0
US
Hello:

I have many files named like this
TFW001234_jpg.jpg
TFW001235_jpg.jpg
TFW001236_jpg.jpg
and so on...

I want to change the whole lot of them to be
TFW001234.jpg
TFW001235.jpg
TFW001236.jpg

They all reside in the same directory and I am trying to us the dos command

rename TFW*_jpg.jpg TFW*.jpg

and it is not working.

Any dos command line help would be appreciated.

Thank you.


John Kolker
Programmer
jwkolker@comcast.net
 
Yes. Remember, in DOS the * symbol means all following

You should try at the command prompt:>

rename TFW00123?????.* TFW00123?.*

The ? is the place holder for only 1 charactor

I did a sample test and it works just fine.
 
There are also non-dos freeware utilities available for renaming groups of files with some cool options. Check download.com and search for rename.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top