I have figured out how to edit batches of files using REN
in Windows 7 Command Prompt. However, this time, I am trying to add a prefix to all files but I am unable to do it. All files are tif files.
For instance, files are located in C:\Users\user1\Desktop\Test_Folder
Files inside each folder begin with 9.
Each file has 5 digits (i.e 90200, 90201, 90202).
I am trying to add a 0 (zero) in front of each file name and change it to 090200, 090201, 090203....
I tried:
FOR %v IN (?????.tif) DO REN %v 0%v
I also tried:
FOR %%a in (*.tif) DO REN "%%a" "0%a"
Please help.
To batch rename files, just select all the files you want to rename, press F2 (alternatively, right-click and select rename), then enter the name you want on the first file. Press Enter to change the names for all other selected files.
Select multiple files in a folder. To do so, press and hold down the CTRL key while you are clicking files. After you select the files, press F2. Type the new name, and then press ENTER.
This one is simpler ...
forfiles /M *.tif /C "cmd /c ren @file 0@file"
Source: https://www.windows-commandline.com/rename-file-extensions-bulk/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With