- GETTING STARTED
- Server connection
- File Transfer
- Directory operations
- File operations
- Script output
Set the protocol used for the server connection.
ScriptFTP version 3 supports FTP and FTPS only. SFTP is supported from version 4.
FTP For standard FTP connections. This is the default value. SFTP For SSH FTP connections. FTPS_EXPLICIT_ENCRYPT_DATA For FTP over SSL connections.
Use this value if you want to encrypt file contents and login (user and password).
ScriptFTP will connect to the FTP server using a standard FTP connection and will then send a specific command to enable SSL mode before logging in. Data connections used to transfer file contents will be encrypted.
FTPS_EXPLICIT For FTP over SSL connections.
Use this value if you want to encrypt login (user and password) but don't care about file contents.
ScriptFTP will connect to the FTP server using a standard FTP connection and will then send a specific command to enable SSL mode before logging in. Data connections used to transfer file contents will not be encrypted.
FTPS_IMPLICIT For FTP over SSL connections.
Use this value if you want to encrypt file contents and login (user and password). Note that the FTP explicit mode (FTPS_EXPICIT and FTPS_EXPLICIT_ENCRYPT_DATA) is more widely adopted by FTP servers..
Implicit security mode will automatically establish an SSL connection as soon as ScriptFTP starts connecting to an FTP server. The port 990 will be used for this mode. Control and data connections will be encrypted.
- Changes will take effect when a new connection to the server is made. So use SETPROTOCOL before OPENHOST in your script.
- Standard FTP is used by default. Unless you want to use FTPS or SFTP there is no need to use this command in your script.
- Depending on the selected protocol SETPROTOCOL will change the TCP port used for connecting to the server. Use SETPORT after calling SETPROTOCOL if you want to set your own value.
FTPS_EXPLICIT_ENCRYPT_DATA was added in ScriptFTP 2.1 build March 14th 2006.
SFTP was added in ScriptFTP 4 on April 2013.
This command always returns "OK".
# Connect to ftp.myhost.com using secure FTP
# download sales.xls and upload it to a local server
# The file is downloaded to the Windows temp directory
# Use secure FTP
# Go back to standard FTP
# Delete sales.xls