I would like to run batch file to rename all FOLDERS ONLY.
Let’s say, I have following folders and files:
A1 ( Folder)
|----> A1.txt A1.doc
B1 ( Folder)
|----> B1.txt B1.doc
C1 ( Folder)
|----> C1.txt C1.doc
When I run batch file, “1” should remove from folder, not from file name though.
So, after you run it. you will get like :
A ( Folder)
|----> A1.txt A1.doc
B ( Folder)
|----> B1.txt B1.doc
C ( Folder)
|----> C1.txt C1.doc
Use
for /dto iterate over directories:This removes any
1from the folder name, though. If the number vary and are only one character long you can doin the appropriate place above instead.