0
我想一个批处理检查2个中给出的文件在目录 +如果他们改变他们的名字重命名文件的子目录与DOS的批处理
到目前为止,我已经得到了这一点:
@echo off
if exist %order.xml && %order.xml.orig goto RENAME
goto END
:RENAME
rename order.xml order.xml.old
rename order.xml.orig order.xml
:END
pause
它工作得很好,但问题是我必须将其复制到每个子目录中。 有没有办法让BATch检查每个子文件夹?一切我tryed只是给了我一个语法错误
您可以使用/ r来遍历子目录并在其上执行命令 –