Get a file with FTP
Description
The Get a file with FTP action retrieves one or more files from an FTP server.
This workflow action does not "crawl" systems.
It will not, for example, access a remote directory and go to other directories to find files that match a wildcard.
This workflow retrieves files from one directory exclusively.
Options
General tab
| Option | Description |
|---|---|
Action name |
The name of the workflow action. |
Server |
|
FTP connection |
An optional FTP Connection from the metadata. Pick one and the server, credentials, transfer mode, timeouts and proxy settings below come from that connection; leave it empty to configure the server on this action. |
FTP server name / IP address |
The name of the server or the IP address. |
Server port |
Port number of the FTP server. |
Username |
The user name associated with FTP server account. |
Password |
The password associated the FTP server account. |
Proxy host |
Proxy server host name. |
Proxy port |
Proxy server port number. |
Proxy username |
Proxy server account user name. |
Proxy password |
Proxy server account password. |
Advanced |
|
Binary mode |
Enable if files must be transferred in binary mode. |
Timeout |
The timeout in milliseconds, for example 30000 for 30 seconds. 0 (the default): no timeout. |
Use active FTP connection |
Enable if you are connecting to the FTP server using Active mode; you must set your firewall to accept connections to the port that your FTP client will open. The default is Passive mode. |
Control Encoding |
Encoding matters when retrieving file names that contain special characters. For Western Europe and the USA, ISO-8859-1 usually suffices. Select encoding that is valid for your server. |
Files tab
| Option | Description |
|---|---|
Remote |
|
Remote directory |
The remote directory on FTP server from which files are taken. |
Wildcard (regular expression) |
Regular expression when you want to select multiple files. For example: .txt$ : get all text files A.ENG:0-9.txt : files starting with A, ending with a number and .txt |
Remove files after retrieval |
Removes each file from the FTP server right after it is downloaded. See the NOTE under Result. |
Move files after retrieval |
Moves each file on the FTP server to the folder below, right after it is downloaded. See the NOTE under Result. |
Move to folder |
The folder on the server to move the files to. |
Create folder |
Creates the move-to folder when it doesn’t exist. |
Local |
|
Target directory |
The directory where you want to place the retrieved files. |
Include date in filename |
Adds the system date to the filename (_20101231). |
Include time in filename |
Adds the system time to the filename (_235959). |
Specify Date time format |
Enable to provide your own date/time format in Date time format. |
Date time format |
Select date time format. |
Add date before extension |
Adds date to the file name before the extension. |
Don’t overwrite files |
Enable to skip, rename, or fail if a file with an identical name already exists in the target directory. |
If file exists |
Used with Don’t overwrite files: Skip (default) leaves the local file and doesn’t download the remote one, Give unique name to local file adds the date and time to the new file’s name, Fail counts the file as an error. |
Add filename to result |
Adds the downloaded files to the result files (checked by default). |
Advanced tab
| Option | Description |
|---|---|
Success on |
Sets conditions of success. The available options are:
|
Limit files |
Sets number of files associated with a condition of success. |
Socks Proxy
| Option | Description |
|---|---|
Host |
Socks Proxy host name. |
Port |
Socks Proxy port number. |
Username |
User name associated with the Socks Proxy account. |
Password |
Password associated with the Socks Proxy account. |
Result
What this action passes on to the next action. See Action results for how results travel through a workflow.
| Result | Value |
|---|---|
True |
Depends on Success on (Advanced tab):
|
False |
The success condition is not met. Without Nr errors less than, the download stops at the first file that fails. The action is also false, before any download, when the server can’t be reached or refuses the login, the remote directory doesn’t exist, the wildcard is not a valid regular expression, or Move files after retrieval is checked while the move-to folder is empty, or doesn’t exist and Create folder is unchecked. With Nr errors less than, an unreachable server, a refused login and an invalid wildcard count as 1 error, so the action is true when Limit files is 1 or more. A missing remote directory and the move-to folder checks give false whatever the condition. |
Errors |
The number of files that failed, or 1 when the action fails before the download. |
Result files |
The downloaded files are added when Add filename to result is checked (the default). The previous result files are kept. |
Result rows |
Passed on unchanged. |
Files retrieved |
The number of files downloaded. |
| Remove files after retrieval and Move files after retrieval act on each file right after it is downloaded, not after all files are: when a later file fails, the files before it are already removed or moved on the server. |