Ftp Commands
This task allows you to connect to an ftp server and issue commands. There are two types of commands supported:
1) The standard ftp commands as defined in RFC 959. Please see list of ftp commands. Only the most useful commands are listed here. Please search the Internet for RFC 959 if you need more information on all the standard Ftp commands.
2) Custom functions provided by the Ftp Command task. Please see list of custom functions.
Please note that the ftp commands, that you normally use in the ftp command-line tools in MSDOS, MacOSX or Unix etc. are not necessarily supported. For example, the LS, CD, Get or Put commands, in many command-line ftp tools are not valid RFC 959 ftp commands. Get and Put are commands created by many command-line ftp tools to implement the RETR and STOR commands, of RFC 959. To put or get files, you can use the custom functions $$GET& $$PUT that are provided by this task.
This task is multithreaded. So you can run multiple Ftp Command tasks simultaneously.
This task also outputs dynamic variables for each response provided by the Ftp server. The variables syntax is: TaskTitle::ResponseX. X is the response from the server for each of your Ftp commands. You can use these response variables in a Variable Monitor task to do conditional processing.
Host
Enter the host name or IP address of the Ftp server. If you have to connect through an Ftp proxy server, or firewall, enter the host name, or IP address of the firewall, or proxy server.
Port
Enter the desired port. Default Ftp port = 21
Password
In the password field, enter your password required to connect. Then in the command list, use the following syntax to send the hidden password: $$LOGIN::username::$PASSWORD$; or if you need to manually login, use: PASS $PASSWORD$. The string $PASSWORD$ will be replaced by the value in the password field. If you have no reason to hide your password, you do not need to fill the password field.
Commands
Enter your ftp commands, 1 per line. The custom commands are case sensitive. First line should normally be the USER command, and second line should normally be the PASS command. This field also supports dynamic variables. Using dynamic variables, you can enter a command which will be dynamically resolved at runtime. example: cd /users/$%USERNAME%$
Example1
USER tom sends username
PASS $PASSWORD$ sends password
ACCT production sends account information
PWD prints current remote ftp directory
CWD /users/tom sets /users/tom as the current ftp directory
$$LCD::c:\test sets c:\test as the current local directory
$$MPUT::test puts all files from c:\test, which include 'test' in their name, to /users/tom
$$MGET:: gets all files from /users/tom to c:\test
Example2
$$LOGIN::user::$PASSWORD$ logon information
PWD prints current remote ftp directory
CWD /users/tom sets /users/tom as the current ftp directory
$$LCD::c:\test sets c:\test as the current local directory
$$PASV sets the passive mode of transfer
$$GET::test.txt gets test.txt from /users/tom to c:\test
$$PUT::test.txt puts test.txt from c:\test to /users/tom
$$LOGIN |
Description: Simple logon using username and password information |
$$LCD |
Description: Sets the current local folder |
$$PASV |
Description: Sets the passive mode of transfer. |
$$PUT |
Description: Puts a single file from current local folder, to current remote ftp folder |
$$GET |
Description: Gets a single file from current remote ftp folder to current local folder |
$$PPUT |
Description: Puts a single file from local path to ftp path |
$$PGET |
Description: Gets a single file from ftp path to local path |
$$MPUT |
Description: Puts multiple files from current local folder to current ftp folder |
$$MGET |
Description: Gets multiple files from current ftp folder, to current local folder |
$$MSGET |
Description: Gets multiple files from current ftp folder to current local folder |
$$MDEL |
Description: Deletes multiple files from current ftp folder |
$$MLDEL |
Description: Deletes multiple files from current local folder |
List of useful ftp commands - RFC 959
HELP |
Description: Returns list of commands or details for a single command |
USER |
Description: Sends the username to begin the login process |
PASS |
Description: After sending the USER command, send this command to complete login |
PASV |
Description: Sets the passive mode of transfer. |
TYPE |
Description: Specifies Ascii or binary mode of data transfer |
PORT |
Description: Specifies host & port to which the ftp server should connect for next data transfer |
ACCT |
Description:Sends the account required for login |
CWD |
Description: Sets the current ftp directory on remote ftp server |
CDUP |
Description: Sets the parent of the current ftp folder to be the current ftp folder |
DELE |
Description: Deletes a single file from the current ftp folder |
RNFR |
Description: Used to rename a file. Specifies the file to be renamed |
RNTO |
Description: Used to rename a file. Specifies the new name for the file |
SITE |
Description: Used to issue a site specific command |
RETR |
Description: Transfers file from remote host |
STOR |
Description: Transfers file to the remote host |