Set FTP
Use this command to set FTP parameters to be used in conjunction with the FTP PUT command. The FTP PUT command copies files to a remote server using Application Framework.
The SET FTP command can set any of the following parameters:
Value | Description |
---|---|
Server |
Specify the server and port to copy to, as well as the protocol (FTP or SFTP). |
Credentials |
Specify the FTP username and password credentials. |
PreCommand |
Specify commands to run before the copy occurs. This allows for operations to run before transferring the file. The actual commands are server dependent. If more than one FTP PRECOMMAND is specified, the commands are queued up and executed in the order that they are encountered. You may find it useful to use this command in conjunction with FTP CLEARCOMMANDS to clear the PreCommand queue once they are no longer required. |
PostCommand |
Specify commands to run after the copy occurs. This allows for operations such as renaming a file after transferring it (i.e. transfer abc.tmp, then rename to abc.final, so that a file watcher can be triggered after completion). The actual commands are server dependent. If more than one FTP POSTCOMMAND is specified, the commands are queued up and executed in the order that they are encountered. You may find it useful to use this command in conjunction with FTP CLEARCOMMANDS to clear the PostCommand queue once they are no longer required. |
ClearCommands |
The FTP CLEARCOMMANDS command is used in conjunction with FTP PRECOMMAND and FTP POSTCOMMAND and will clear the PreCommand and PostCommand queues. |
Syntax
SET FTP SERVER "Host" [Protocol [Port]]
SET FTP CREDENTIALS "UserName" "Password" SET FTP PRECOMMAND "Command"
SET FTP POSTCOMMAND "Command"
SET FTP CLEARCOMMANDS
where:
- Host is the server hostname.
- Protocol is the transfer protocol and can be either FTP or SFTP.
Note: SFTP is only supported for Application Framework running on Linux OS. SFTP is not supported for Windows OS.
- Port is optional and is the port for the Host specified.
- UserName is the username to use in the FTP credentials.
- Password is the password to use in the FTP credentials.
- Command is the command to run before or after the copy occurs. The commands are server dependent.
See also