On a shared drive there is a directory "Q:\batch_Rxaoutput" inside that directory there are over a thousand directories for example "Q:\batch_Rxaoutput\SUNY" or "Q:\batch_Rxaoutput\PDFL". The subdirectory within "Q:\batch_Rxaoutput" contains only four letter codes where monthly reports are outputted by an SSIS package. Sometimes a report needs to re-ran due to errors so there are multiple reports created within one of the thousand or so output locations. My goal is to loop through each folder insided "Q:\batch_Rxaoutput" and move the folders, subfolders and files contain the same name.
For example in Q:\Batch_Rxaoutput\EEKY there is:
I want to to move only the no current folders,subfolders and files.
the monthly folder names are Month.year_year.month.hours(military).hours.seconds.milliseconds
So basically if there are multiple folder names Feb2015_* or Jan2015* move the ones that have the lowest numeric value after the underscore.
I would love to accomplish this from a .bat cmd if possible.
Please let me know if there is more info that would help!