- GETTING STARTED
- GUIDES
- COMMANDS
- Server connection
- File Transfer
- Directory operations
- File operations
- Script output
- Miscellaneous
- OTHER
SETUPLOADMODE
Specify how ScriptFTP uploads files.
Syntax: SETUPLOADMODE(mode)
| 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. |
Remarks:
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.
Example:
# 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\*.*")

