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 am currently using the following script

[scriptftp="upload.ftp"]LOGTO("C:\logs\TransferLog.txt",APPEND)
OPENHOST("ftp.***.com","***","***")
CHDIR("/2legsinvdata")
SETPASSIVE(DISABLED)
PUTFILE("C:\Program Files (x86)\SpaceWare\AMan\DBs\AMan.mdb")
CLOSEHOST[/ScriptFTP]

Obviously the import information is ***. The file is about 180Mb and when its uploading the mdb file becomes in use so is locked and if the file in use by one of the colleagues also becomes locked so wont upload.

Is there a way of creating a second script that tries to create a copy, if it fails then tries again 5 mins later, or just tries to make a copy evey 5 mins
Yes, it is possible. You have to use the EXEC command to call the windows "copy". For example:

[scriptftp="copy_local_file.ftp"]# With the /Y we avoid the windows copy command to prompt to ask if
# we want or not to overwrite the destination file

EXEC('copy /Y "C:\Program Files (x86)\SpaceWare\AMan\DBs\AMan.mdb" C:\copy_of\AMan.mdb')[/ScriptFTP]

Note the use of simple quotes here to delimit the EXEC parameter. This is used when the parameter itself needs to include double quotes. See http://www.scriptftp.com/reference.php?go=topic260