Friday, 11 December 2015

Tidy up old files

Annapurna will run a batch file Annapurnatidy.bat as part of the back up process.

This can be used for a number of purposes but the most common is to remove old files.

Here is a line in a batch file to delete old ediorder files > 120 days.

forfiles /P l:\files\edi /M *.ediorder  /S /D -120 /C "cmd /c del @path >> l:\files\logs\Annapurnatidy.log"


/P is the path
/M is the mask
/S is to look in subfolders
/D is the number of days
/C is the command to run - in this case delete.


The exact terms to use will depend on the site.


No comments:

Post a Comment