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!
FTP Download only new files
Moderator: Martin
Re: FTP Download only new files
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
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
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
{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.
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);
Then use FTP Download Files with the {download,listformat,comma} as the path.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.