Topic "Syncronize script with delete, but only delete older than n days"

Author Message
WEHA
[View user's profile]

Joined: 2017-07-07
Posts: 1
Location: Belgium
Hello

I've been running a script to sync backups to another location with a delete parameter so I have the same folder on both sides.
Now to be able to withstand a cryptolocker attack I would like the sync to only delete files in the secondary folder that have a certain age.
I have seen posts about similar behavior but I don't want to just remove any file older than n days but only the ones that have been deleted from the source folder.
So if I have an old backup of something, it would remain in place.

thanks!
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27059
Location: Prague, Czechia
You can run the synchronize once without the -delete switch.
And then again with -delete -filemask=*<nD.
Advertisements

You can post new topics in this forum

Search

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License