This project has moved and is read-only. For the latest updates, please go here.

Append Date and Delete Backups Older than 5 days

May 13, 2016 at 10:23 PM
First of all, Thank you. Love this Add-In. Easy. Clean and provides endless peace of mind.

I am now trying to use the BAT script to append the date and delete backups older than 5 days.

attached is a screen shot of :
Add-In settings,
Path for backups and BAT file, and
modified Append Date.BAT


Can you tell me what i am doing wrong?

Thank you.
May 15, 2016 at 8:09 AM
Hello Greg,
unfortunately i cant decipher the screenshot.
You also didnt tell what doesnt work.
Stay the files unchanged or is the plugin reporting an error?

For debug reasons it is best to call the batch-file from command line to see the output.
You can also add some "echo" commands to follow the execution order.
You should also add some echo commands to see the contents of the variables.
Especially the date format depends on the locale of the OS, so best is to check these variables.

If it works at command line, then you should add the script to the plugin as shown.

Kind regards,
May 27, 2016 at 3:08 AM

Is Greg asking to delete all backups that are 5 days older?

I also wish to know know hot to configure the addin to be able to do that.

Thank you in advance.
May 27, 2016 at 6:35 AM
Edited May 27, 2016 at 6:36 AM
you can use the script in the documentation for adding a rotating suffix / prefix:

As the date depends on the language settings, you might have to change line no 4.

For deleteing files older than 5 days you can use:
forfiles -p "C:\<backuppath>" -m . -d -5 -c "cmd /c del @path"
or older windows versions:
forfiles -p "C:\<backuppath>" -m . /D -5 /C "cmd /c del @path"

Kind regards,