Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Delete remote files older than

@Paccatore: There's no limit. The problem is likely elsewhere. Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, use /log=C:\path\to\winscp.log command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
Paccatore

Re: Delete remote files older than

Sorry but rm *<180D doesn't work, error "can't get files attribute" or something like "there are no file", what's the limit?
martin

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

Isn't that enough?
schultkl

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...
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.
GTypeR

Delete remote files older than

Hi. I've been trying to figure out if this is possible with WinSCP. However, I can't 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 can't do it that way.