问题
I need a .bat file that can go into a folder with many sub-folders and rename every .iso file to "Game.iso". I had a way to do it but I cant seem to find it anymore and I lost the damn file :(.
Example:
-Main DIR
--A
---file name.iso
--B
---file name.iso
--Z
---file name.iso
What I want to be like when I run .bat file:
-Main DIR
--A
---game.iso
--B
---game.iso
--Z
---game.iso
That is really my main concern. That would be super amazing and I would appreciate it tremendously.
回答1:
Simple:
for /r %%a in (*.iso) do (
ren "%%~a" "%%~paGame.iso"
)
And that should work. Simply run it from the Main Dir
来源:https://stackoverflow.com/questions/25233282/bat-rename-files-in-folders-sub-folders-to-specific-name