Posted: 2016-01-27 19:04
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\
put C:\ats\vendor\vendor.edi /home/data/ats/vendor/vendor.edi
Location: Prague, Czechia
To upload only files modified in the last 5 hours, and which are not present in the remote directory yet, use:
See also https://winscp.net/eng/docs/faq_script_modified_files
You can post new topics in this forum
And it's free!