I have multiple auto-generated folders in the location C:\ABC . Each auto-generated folder is created at the start of the day and naming convention is "HS".
Eg:
- C:\ABC\HS08042015
- C:\ABC\HS08032015
- C:\ABC\HS08022015
- C:\ABC\HS08012015
So if today's date is 08042015, then I want the batch file to copy the previous day's folder (HS08032015) to the new location. So on 08042015, the folder C:\ABC\HS08032015 needs to be copied to another location D:\Reports\HS08032015
As such, this batch file should always copy the previous days, dated folder over to the new location.
I was thinking of using XCOPY, but really could not write a working code.
Any help is highly appreciated. Thanks much.