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.
Need help writing a script? Have any question about ScriptFTP?
Hi,

Just downloaded the demo and searched the forums, but the closest thing I can find was this from 2009: http://www.scriptftp.com/forum/viewtopic.php?f=7&t=175

I am wondering if it is possible to do the following:

1) On an FTP site, there is an index.txt file that has information regarding all the other files (type of document, filing date and other identifiers)
2) I want to get the file path of files that only match a certain identifiers (document type = "A")
3) Download said files

It looks like a foreach + list would work. I guess my question is there a way to automatically script $list from the index.txt (which changes every day) file?

Thanks, greatly appreciated!
Hello,

Unfortunately I think that you need an external tool to read the txt file on the FTP site and get a list with the A type files. Then this tool should provide ScriptFTP a list with the files via, for example, a command line parameter. ScriptFTP should be called this way:

ScriptFTP.exe mydownloadscript.ftp "file1.txt|test.txt|image432.jpg"

And the script should, as you pointed, rely on the FOREACH command:

[scriptftp="mydownloadscript.ftp"]$file_list = GETPARAM(3)

FOREACH $file IN $file_list
GETFILE($file)
END FOREACH[/ScriptFTP]