I have a large sum of files within directories and sub-directories with a variety of names. Currently I have a script that can do part of what I need, but the script must be in the containing directory of files I want renamed. I want to modify my script so that it can be placed in a desired root directory of files I want to rename and have it recursively rename files within all directories. Here is my current script:
RENAME "%FILE1%" "%NEWFILE1%" RENAME "%FILE2%" "%NEWFILE2%" RENAME "%FILE3%" "%NEWFILE3%" RENAME "%FILE4%" "%NEWFILE4%"
(And so on...)
Some of the file names I am working with are somewhat uniform, these are text-based documents that are named as such:
XML_log1.txt XML_log2.txt databaseindex.txt prefab.xml md5_index.txt
While some of these names can be interpreted then changed with the script, I am also hoping to format the script in a template format so that it may be re-purposed or used for a similar situation in the future.
I know that FOR looping is most likely what needs to be implemented, but I don't know how to do this if that is the case. How can this be achieved?