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
[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
[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
liked Script FTP? Try our other product Email Parser