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: Automate download/upload of only new files

To upload only files modified in the last 5 hours, and which are not present in the remote directory yet, use:

put -neweronly -filemask=*>5H C:\ats\vendor\vendor.edi /home/data/ats/vendor/vendor.edi

See also https://winscp.net/eng/docs/faq_script_modified_files
prmayer

Automate download/upload of only new files

Pretty new to the scripting features of WinSCP but I need to grab daily files from one FTP and move them to another preferable while appending a bit of text to the start. I've got the download and upload script working but I've run into an issue. The important part is I only want to have the destination folder get loaded to have the newest file. The source folder could have months worth of data I won't need but don't want to delete. Is there a way to say only download or upload the newest file or a file created in the last x hours?

Right now I'm on using:
get vendor.edi C:\ats\vendor\
and:
put C:\ats\vendor\vendor.edi /home/data/ats/vendor/vendor.edi