Batch Dos rename

Associate
Joined
18 Oct 2002
Posts
109
Location
Stamford, Lincolnshire
Hi

I need to batch rename using dos a large number of files

the files are in the format....

Z001.15x2.red.png
Z002.15x2.red.png
Z008.15x2.red.png

(i.e. in the above the first part (Z001.) is not sequential - it could be any 8 charecters)


and i want them to become...

*.15x2.png

What is the dos command which will do this?

cheers, Neill
 
What is the dos command which will do this?
It should be possible with ren (rename) but in the past I've found it to be a bit picky when it comes to dealing with wildcards. At times like this I keep thinking that the dos command set is really naff compared to UNIX, doing this sort of thing in a shell script is a piece of bun.

The best option might be to investigate some of the freeware GUI file renamers, a lot of them have options to remove chunks from names exactly in the manner you need.
 
I'd probably do a for loop doing a rename action on each file in the folder it is run, for example:

Code:
for /r path %%var in (*.*) do rename_command %%var
 
Hi

I am helping a PM with some work he needs doing, I will pass these suggestions on to him - and let you know if they work

thanks, Neill
 
Back
Top Bottom