SETUPLOADMODE Specify how ScriptFTP uploads files
From version 4.1 this command has been deprecated. Now SETUPLOADMODE(DIRECT) is enabled by default. This have been done because most modern FTP servers do not replace a file unless the upload has been completely finished.
TEMP This is the default mode. ScriptFTP will upload the files with a temporary filename (appending .part to the filename). As soon as the upload has completed ScriptFTP will rename the file to its original filename (removing the .part suffix) DIRECT Use this mode to upload the files directly with their original filename.
Uploading files with DIRECT mode is not recommended. If ScriptFTP is uploading a file that already exists on the server it will be overwritten. If the transfer is interrupted the remote file will become corrupted. However, some FTP servers store the files being uploaded in a temporary directory until the upload is completed by the client. If this is true in your environment no file corruption will occur even if the transfer is interrupted and the mode has been set to DIRECT.
# Connect to ftp.myftp.com OPENHOST("ftp.myftp.com","myuser","mypassword") # Change current remote directory CHDIR("/help/help/images") # The FTP server does not allow # renaming so we set the upload # mode to DIRECT SETUPLOADMODE(DIRECT) # Upload all files in the directory images PUTFILE("C:\htdocs\help\help\images\*.*")