Delete remote files older than

Advertisement

GTypeR
Guest

Delete remote files older than

Hi. I've been trying to figure out if this is possible with WinSCP. However, I cant see if something like the -filemask switch is available for the rm command or if the synchronize command has a remote -delete switch, rather than a local one.

I'm basically trying to upload the latest file and then delete anything over 1 month old on the remote server.

I haven't got ssh access so I cant do it that way.

Reply with quote

Advertisement

Guest

Re: Delete remote files older than

I've just thought, I may just delete the whole remote directory and just use a put command with the -filemask switch to upload the most recent files. I'll do this if there's no cleaner solution.

Reply with quote

schultkl
Joined:
Posts:
4
Location:
USA

The 'M' constraint seems to currently refer to size, rather than time (that is, "M (Megabyte)") .

I see the following time constraints: "One of the following units must be used: Y (years), D (days), H (hours), N (minutes) or S (seconds)."

Might a month constraint exist? Thank you.

Note: we can get close enough for our purposes using 182D instead of 6M...

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,505
Location:
Prague, Czechia

schultkl wrote:

The 'M' constraint seems to currently refer to size, rather than time (that is, "M (Megabyte)") .
Thanks for spotting this. I have fixed my previous answer.

Note: we can get close enough for our purposes using 182D instead of 6M...
Isn't that enough?

Reply with quote

Advertisement

You can post new topics in this forum