I run a backup of each computer that gets stored in:
Each computer has a subfolder.
Computer 1: D:\Backup\Computer1 Computer 2: D:\Backup\Computer2 Computer 3: D:\Backup\Computer3
Within each computer, is another folder, which is the date of the backup Computer 1: D:\Backup\Computer\20110513
Within the specific computer folder, is a group of files and subfolders inside of it.
How can I delete the backup folders that are older than 3 days old? So today is May 13, 2011, I want to delete everything that's more than 3 days old.
So a folder in
Computer 1: D:\Backup\Computer 1\20110508
would need to be deleted.
How can I run a batch file to search inside each Computer's folder and delete all the subdirectories and files that are older than 3 days.
The name of the computer folders can change and there not consecutive numbers, so I would you would need to check the D:\Backup subdirectories that are older than 3 days, but during the deletion, it would prevent deleting the computer name folder - incase it hasn't had a backup in 3 days. I don't want the computer folder getting deleted then.