ftp automation

ScriptFTP

The professional tool to automate FTP, SFTP, FTPS and schedule FTP batch jobs

The forum is now read only. Please, go to the the main ScriptFTP website if you need help.
Post here if you experience file transfer problems or unexpected errors.
Hi.

Is it possible to include in GETLIST more than one criteria?
i.e. i need to include all files with .txt AND .doc.

Best regards
No, sorry, but you can get both listings calling GETLIST twice.
HI.
So i should call twice the Getlist command, but is it possible to have the results of the second call in append to the first list?
Best regards
Yes, you can merge the file lists just concatenating them. See the following example:

This should have been my first answer to your post ;)
Code: Select all# This examples merge two file lists of local files but it is # also applicable to files located in the FTP site, just replace # LOCALCHDIR by CHDIR # and GETLIST(....,LOCAL_FILES) with GETLIST(.....,REMOTE_FILES) # Change current local directory to C:\mydir1 LOCALCHDIR("C:\mydir1") # Get the txt files in listing of C:\mydir1 GETLIST($list_txt,LOCAL_FILES,"*.txt") # Get the doc files in listing of C:\mydir1 GETLIST($list_doc,LOCAL_FILES,"*.doc") # File listings in ScriptFTP are actually plain text strings # where the items are separated by the | character. PRINT("list_txt is:") PRINT($list_txt) PRINT("list_dic is:") PRINT($list_doc) # So to merge two file listings you just have # to concatenate them: $list_merged=$list_txt.$list_doc # The following PRINT should produce an output like: # file1.txt|file2.txt|file1.doc|file2.doc... PRINT($list_merged) # And then you can use your file listing normally # with the FOREACH statement FOREACH $item IN $list_merged     PRINT($item) END FOREACH