Is there a way to only upload a file if it doesn't already exist on the server? I don't want to overwrite an existing file because it means the application on the server hasn't yet processed the previous upload.
I don't know the name of the file in advance.
Ideally, it would be an option on SYNC that would only upload new files, but I haven't seen such a thing. Any suggestions would be appreciated.
I don't know the name of the file in advance.
Ideally, it would be an option on SYNC that would only upload new files, but I haven't seen such a thing. Any suggestions would be appreciated.
You might want to use the GETLIST() command to return a list of remote files, loop through the list, and if the file does not exist, then perform your upload. Here's the algorithm:
to johnhom
to ScriptFTP support, in the documentation section in a tree of a table of contents is absent a direct reference at a command FOREACH.
Excuse for my English, I use the machine translator.
I don't know the name of the file in advance.to Frankdl
Ideally, it would be an option on SYNC that would only upload new files, but I haven't seen such a thing.
FTP Script
Excuse for my English, I use the machine translator.
FOREACH is explained at Documentation->Getting started->Handling file lists
But someone looking for information about FOREACH will not find it easily, you are right. I've just updated the title of that help topic to "FOREACH. Handling file lists"
Thanks everybody for the contributions to the forum.
But someone looking for information about FOREACH will not find it easily, you are right. I've just updated the title of that help topic to "FOREACH. Handling file lists"
Thanks everybody for the contributions to the forum.
liked Script FTP? Try our other product Email Parser