Automate download/upload of only new files

Advertisement

prmayer
Joined:
Posts:
5

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

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum