With WinSCP, use the rm
command with a filemask with a time constraint (to select only files with certain age, if I understand correctly, what you want to do).
E.g. to delete all files older than 5 days:
rm *<5D
For all the other instructions to assemble a script and schedule its run, see:
- Automate file transfers (or synchronization) to FTP server or SFTP server
- Schedule file transfers (or synchronization) to FTP/SFTP server
See also:
- Documentation for the
rm
command; - Documentation for the file masks.