.bat将文件夹/子文件夹中的文件重命名为特定名称 [英] .bat rename files in folders/sub-folders to specific name
问题描述
我需要一个.bat文件,该文件可以放入包含许多子文件夹的文件夹中,并将每个.iso文件重命名为"Game.iso".我有办法做到,但似乎找不到了,我丢了该死的文件:(.
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 :(.
示例:
-主DIR
--A
---文件名.iso
--B
---文件名.iso
--Z
---文件名.iso
Example:
-Main DIR
--A
---file name.iso
--B
---file name.iso
--Z
---file name.iso
运行.bat文件时我想要的样子:
-主DIR
--A
--- game.iso
--B
--- game.iso
--Z
--- game.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.
推荐答案
简单:
for /r %%a in (*.iso) do (
ren "%%~a" "%%~paGame.iso"
)
那应该可行.只需从Main Dir
这篇关于.bat将文件夹/子文件夹中的文件重命名为特定名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!