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?
I'm in need of an automated FTP client and thought that this one might work, but I'm not sure how the script would be written. Here's what I need to do....

The server to which I need to connect has multiple directories. Within each directory is a file (or sometimes two files) that I need to download. So I need the FTP client to log into the server, and then check 'inside' each directory for any new files that haven't already been downloaded. Any new files that have not already been downloaded, will be downloaded. All files downloaded will be placed into one directory on my computer. Is this possible with your FTP client?
Yes, it is possible. You have to use the SYNC command:

http://www.scriptftp.com/reference.php?go=topic520

For example:

[scriptftp="sync.ftp"]# Synchronize a local directory from an FTP site
SYNC("C:\accounting","/accounting",DOWNLOAD,SUBDIRS)[/ScriptFTP]
All files downloaded will be placed into one directory on my computer.
ScriptFTP support, SYNC does not fit, it will keep the directory structure...
Wandrey, I think that what he really means is that he wants everything to be placed _under_ the same directory. But let's the user clarify this if needed.