How to delete files more than X days old in Windows CMD

Just a quick post on a really handy command to keep around.

 

If you have ever needed to script or even just manually delete a bunch of files that were old than X days then you can use the following command in Windows CMD:

 

forfiles /p “C:\source_folder” /s /m *.* /c “cmd /c Del @path” /d –7

 

Just make sure you change the path to where your files are and in this example the “/d -7” at the end is deleting files older than 7 days, you can change that number to anything you wish.

Backup Assist fails to delete old backup that doesn’t exist anyway

Backup Assist is a wonder data backup and recovery tool, but nothing is perfect and everything has problems here or there. One that I have come across more than once is:

Backup Assist Fails to delete old backup that is not even there any longer. Basically this is due to a corrupted catalog, so we need to rebuild it:

1. Shutdown Backup Assist Service

2. Open explorer and browse to: c:\ProgramData\BackupAssist 6\Catalogues

3. Rename to catalouges.old.

4. Start Backup Assist Service

For any restores using the Restore Console, make sure to point to this .old folder if restoring from a date in that .old timeframe.  If Single Instance Store can just drag and drop from the backup drive.