Script

FTP

The professional tool to automate FTP, SFTP, FTPS

and schedule FTP batch jobs

Syntax:

SETCLOCKDIFF(seconds)

  • seconds: time difference in seconds between the FTP server and the PC where ScriptFTP is running. It is calculated via the formula: Server time – PC time.

Remarks:

In order to synchronize (SYNC) files ScriptFTP needs to know the time difference between the PC it is running on and the FTP server. By default the calculation of this time difference is performed automatically when you call SYNC. However, if SYNC reports an error calculating this time difference you will have to use SETCLOCKDIFF in order to set it manually. Also see Transferring modified files only.

Return value:

This command always returns “OK”.

Examples:

# Connect to FTP server
OPENHOST("ftp.myhost.com","myuser","mypassword")
 
# Synchronize a local directory with this FTP site.
# The time difference needs to be set manually because
# we do not have write permissions on the FTP
# server.
SETCLOCKDIFF(3600)
SYNC("C:\accounting","/accounting",DOWNLOAD,SUBDIRS)
 
# Close connection
CLOSEHOST