Page 1 of 1
FTP Download only new files
Posted: 28 Aug 2018 21:15
by efyzz
Hello,
Is there any possibility to download only new files with the FTP Download action? Normally existing files in the local directory are overwritten, but I want to download only new files, that not exist on target yet.
Thanks in advance!
Re: FTP Download only new files
Posted: 01 Sep 2018 19:11
by Martin
Hi,
Unfortunately that's quite complicated. You'd have to use an action FTP Init Variable File List and remove all files from the list that are already available locally and then download the rest.
Regards,
Martin
Re: FTP Download only new files
Posted: 02 Sep 2018 17:19
by Desmanto
Since there is not direct way, you can use script to do it.
Use action
Init Variable File List and save to variable {local}
Use action
FTP Init Variable File List and save to variable {ftp}
Use script and remove all existing file list from ftp
Code: Select all
download = removeAllElementValues(ftp, local);
{download} now contains only the files exist in {ftp} but not in {local}.
Then use
FTP Download Files with the {download,listformat,comma} as the path.