SETCLOCKDIFF Manually set the time difference between client and server
- 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.
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.
This command always returns “OK”.
# 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