Windows XP: how do I add 00 in front of every file via command prompt?

I tried REN * 00*.gif but it doesn't work.

link|improve this question

40% accept rate
1  
I know this isn't exactly what you've asked for but there is a program called Bulk Rename Utility that does this and a lot more. I see someone has already answered how to do this via command prompt so you should be set that way :) – victoroux Nov 21 '11 at 19:21
feedback

1 Answer

up vote 3 down vote accepted

If you really want to rename everything:

for %a in (*.*) do ren %a 00%a

If you only want to rename .gif files:

for %a in (*.gif) do ren %a 00%a
link|improve this answer
great! it works! – reyes Nov 21 '11 at 19:30
1  
For future reference: this works properly on Windows XP but not on Windows 7; one of the files will be double-renamed (so x.gif would become 0000x.gif in this case). The easiest workaround is to create a new directory and use move instead of rename: move %a x\00%a – Harry Johnston Nov 21 '11 at 20:37
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.