0

i want a BATch to check if 2 given files are in the directory + if they are change their names

so far i have gotten this:

@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

which works just fine, but the problem is i have to copy this into each subdirectory. is there a way to let the BATch check every subfolder? everything i tryed just gave me an syntax-error

marcel
  • 1
  • 1
  • 1

1 Answers1

0

You are looking for this:

recursive renaming file names + folder names with a batch file

All it is is a for loop with a goto statement. The answer actually just renames files, not folders so should be exactly what you wanted.

Community
  • 1
  • 1
Joe
  • 11,147
  • 7
  • 49
  • 60