|I am looking to rename folders at a specified location but only want to rename them if a text string exists in the folder name. I have another app that creates a set of randomly generated folder names based on current %COMPUTERNAME%. These could all be located in C:\MyFolder|
I would like to rename the following example to the examples below:
would be renamed to:
Any ideas? Thanks in advance
I found this thread from a while back which is on the right track but only replaces the first three characters of each folder.
:: Fix.cmd Syntax: Fix Folder_Name String
:: Fix C:\MyFolder 180
For /F %%a in ('Dir /B /AD-H %1') Do Call :REN %%a
Echo Move "%Fld%\%*" "%Fld%\%RDir%"