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.
Hello,

First, cool product.. I'm doing a few pilots with this software for backup cases.

I'm using the following script
FTP Script
  1. $LogfileName="C:\backup\Logs\Log-".getdate(format2).".txt"
  2. LOGTO($LogfileName)
  3. OPENHOST("xxx","xxx","xxxxx")
  4. SYNC("C:\Data","/00003",UPLOAD_DELETE,SUBDIRS)
after a certain while I receive the following error:
Skipping (remote file is up to date) Appdata\Mamut\Data\Client\000\001\gl_lonna.dbf
Uploading (remote file not found) Appdata\Mamut\Data\Client\000\001\gurudata.dbc
***** SYNC Error #24: Error reading local file.

CLOSEHOST
Disconnected.
The file is in use, so scriptftp is not able to upload the file. I need scriptftp to continue uploading the rest of my files and skip this one. At a moment when the file is free it should be done later.

Is that possible? If not, can you modify scriptftp to be able to do this?
Please let me know!

kind regards,
Bas
If the file is always the same you can add it to the upload exclusion list using ADDEXCLUSION. For example:
FTP Script
  1. ADDEXCLUSION(UPLOAD,"gurudata.dbc")
  2. SYNC("C:\Data","/00003",UPLOAD_DELETE,SUBDIRS)
Then you can use SYNC again to retry the upload of gurudata.dbc only:
FTP Script
  1. # Clear the upload exclusion list
  2.  
  3. # Try to synchronize again gurudata.dbc
  4. :retry
  5. $result=SYNC("C:\Data","/00003",UPLOAD_DELETE,SUBDIRS,"gurudata.dbc")
  6. # if SYNC failed do the following
  7. IF($result!="OK")
  8.     # Wait for 10 seconds
  9.     SLEEP(10)
  10.     # jump to retry
  11.     GOTO :retry

If the file is not always the same the best available solution is to retry syncronization again a bit later:
FTP Script
  1. :retry
  2. # Synchronize every file
  3. $result=SYNC("C:\Data","/00003",UPLOAD_DELETE,SUBDIRS)
  4. # if SYNC failed do the following
  5. IF($result!="OK")
  6.     # Wait for 10 seconds
  7.     SLEEP(10)
  8.     # jump to retry
  9.     GOTO :retry
If you find that none of the solutions is useful for you we can make a customized version that simply skips this kind of error and only shows a warning.