Windows XP: how do I add 00 in front of every file via command prompt?
11,231
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
If you need to add the prefix to file names with spaces in them put quotes around the %a and 00%a at the end of the line, i.e.
for %a in (*.*) do ren "%a" "00%a"
Related videos on Youtube
Author by
reyes
Updated on September 18, 2022Comments
-
reyes over 1 year
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.
-
victoroux over 12 yearsI 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 :)
-
-
reyes over 12 yearsgreat! it works!
-
Harry Johnston over 12 yearsFor 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
-
jjxtra over 11 yearsI'm not seeing the double rename problem on Windows 8, maybe they fixed it
-
ᴍᴀᴛᴛ ʙᴀᴋᴇʀ about 9 yearsWorks great! Now to find the undo option... Doh!
-
cantsay over 7 years@HarryJohnston works fine for me (Windows 7 Pro SP1 x64)