Script

FTP

The professional tool to automate FTP, SFTP, FTPS

and schedule FTP batch jobs

MENU MENU
Post here if you experience file transfer problems or unexpected errors.
I am running into an issue that SYNC exits when it encounters a source file that is in use.

The error code is #16024, which is listed as "Error reading local file". This seems consistent with the "in use" diagnosis.

The question I have is if there is a workaround such as to skip the file or log it as incomplete, but continue to rest of the SYNC?

Thanks in advance,
RyanG

--------------------

[scriptftp="file_synchronization.ftp"]$result=SYNC($local_dir_to_synchronize,$remote_dir_to_synchronize,UPLOAD_DELETE,SUBDIRS)

IF($result!="OK")
PRINT("Cannot syncronize. Sending an email and aborting in 5 seconds.")
EXEC($mailer_cmd_line_2)
SLEEP(5)
EXIT(1)
END IF[/ScriptFTP]
Hello,

The only workaround at this moment is to retry SYNC again if it failed and hope that the file is not blocked again:

[scriptftp="synchronize_files.ftp"]:start
$result=SYNC($local_dir_to_synchronize,$remote_dir_to_synchronize,UPLOAD_DELETE,SUBDIRS)

IF($result!="OK")
SLEEP(5)
GOTO :start
END IF[/ScriptFTP]

If the file that is blocked by another process is always the same you can also use ADDEXCLUSION to ignore that file and transfer it separately.