I need change a lot of folders with a batch script file..
I have those format of name folders:
- 2013.03.12.08.05.06_Debug_Test1
- 2013.03.12.08.04.09_Debug_Test2
- ...
I need change for this:
- 2013.12.03.08.05.06_Debug_Test1
- 2013.12.03.08.04.09_Debug_Test2
Invert the number 12 with the number 03
This is possible using a windows batch file?
Should get you started.
The first
FORselects directories of the format*.*.*.*and renames them*-*.*.*with the 2nd and 3rd elements swapped.The second renames the renamed directories to change the
-to.Consider directories
2013.03.12.08.05.06_Debug_Test1and2013.12.03.08.05.06_Debug_Test1- attempting to rename the one will fail because the other exists, hence need to rename twice.(I've assumed that '-' does not exist in your directorynames - you may wish to substitute some other character -
#,@,$,qsuggest themselves)Note that I've simply
ECHOed the rename. Since the second rename depends on the first, the second set wouldn't be produced until theechois removed from the first after careful checking.I'd suggest you create a sample subdirectory to test first, including such names as I've highlighted.