The FTP Actions allow you to add various FTP commands to your build.

Use the FTP Connection to define a connection, and then specify this connection in the other FTP actions.  Your build should include an FTP Disconnect action to close the FTP connection.

Example

FTP Connect

This action is used to define the connection name (for use in the other FTP actions), and will also connect to the FTP server during your build using the supplied credentials.

  • Connection Name - specify a unique name for the connection. This is used in the other FTP actions to select which connection to use.
  • Passive - Instructs the FTP client and server to use passive mode transfers, this is needed when going through some firewalls
  • Detailed FTP Logging - Outputs the raw FTP commands and log messages to the log
  • Binary/ASCII Transfer - Sets the transfer mode to either binary or text.
  • FTP Server - specify the internet address of the FTP server to connect to. You can either use an IP or hostname.
  • Port - specify the port to use for FTP. The standard port number is 21.
  • Authentication - if the FTP connection requires authentication, then enter the username and password.
  • FTP Proxy - specify the proxy settings if using a proxy server.

FTP Download File

This action is used to download a specified file from an FTP server to the local file system.  Before running this action, you may want to use a FTP Change Directory action to change the remote directory.

  • Connection Name - select the connection (see FTP Connect action)
  • Filename - specify the name of the remote file to download
  • Detailed FTP Logging - Outputs the raw FTP commands and log messages to the log
  • Allow resume - if the file exists locally and is incomplete, then the download will attempt to resume the build
  • Allow overwrite - if the file exists locally the action will not fail, but will delete the local file before downloading
  • Download to directory - specify the local directory to save the file to
  • Use remote/specified file - specify to use the remote filename for the local copy, or to use a different filename

FTP Upload

See the FTP Upload topic.

FTP Change Directory

This action is used to change the remote directory on the FTP server.  You can use a single directory name, eg. "wwwroot" or specify a directory hierarchy, eg. "wwwroot\FinalBuilder\downloads".

  • Connection Name - select the connection (see FTP Connect action)
  • Detailed FTP Logging - Outputs the raw FTP commands and log messages to the log
  • Remote Directory - specify the name of the remote directory or directory hierarchy to change to

FTP Change Up Directory

This action is used to change up a directory on the FTP server.  It's the equivalent of doing "cd .." in the DOS file system.

  • Connection Name - select the connection (see FTP Connect action)
  • Detailed FTP Logging - Outputs the raw FTP commands and log messages to the log

FTP Get Remote Directory

This action is used to get the current directory on the FTP server.  It's the equivalent of doing a "PWD" in the DOS file system. You may wish to use this action to simply log a record of the remote directory, or you can capture the remote directory into a FinalBuilder variable for use in other actions.

  • Connection Name - select the connection (see FTP Connect action)
  • Detailed FTP Logging - Outputs the raw FTP commands and log messages to the log
  • Put in FinalBuilder variable - specify the variable to hold the remote directory.

FTP List Directory

This action is used to get a list of the files in the current remote directory of the FTP server.  You could use the information gathered from this action to specify files to download using the FTP Download File action in conjunction with a List Iterator action.

  • Connection Name - select the connection (see FTP Connect action)
  • Detailed FTP Logging - Outputs the raw FTP commands and log messages to the log
  • File Spec - specify the file specification to search for files, eg. *.bin
  • Detailed Listing - other information such as the file size is also retrieved (the extra information is dependent on the FTP server)
  • Log listing to FB Log - if this is checked, then the listing will be sent to the FinalBuilder log.
  • Put listing in FB variable - if a variable is specified, then the listing of files is saved to the FB variable

FTP Get File Size

This action is used to retrieve the size of the specified file on the FTP server.

  • Connection Name - select the connection (see FTP Connect action)
  • Detailed FTP Logging - Outputs the raw FTP commands and log messages to the log
  • Filename - Specify the name of the file on the server to query.

FTP Create Directory

This action is used to create a directory on the FTP server.

  • Connection Name - select the connection (see FTP Connect action)
  • Detailed FTP Logging - Outputs the raw FTP commands and log messages to the log
  • New directory name - the name to give the new directory.
  • Do not fail if directory already exists - with this checked the action will not fail if the directory already exists on the server

FTP Delete Directory

This action is used to delete a directory on the FTP server.

  • Connection Name - select the connection (see FTP Connect action)
  • Detailed FTP Logging - Outputs the raw FTP commands and log messages to the log
  • Directory name - the name of the remote directory to delete.

FTP Delete File

This action is used to delete a file on the FTP server.

  • Connection Name - select the connection (see FTP Connect action)
  • Detailed FTP Logging - Outputs the raw FTP commands and log messages to the log
  • Filename - the name of the remote file to delete.

FTP Rename File

This action is used to rename a file on the FTP server.

  • Connection Name - select the connection (see FTP Connect action)
  • Detailed FTP Logging - Outputs the raw FTP commands and log messages to the log
  • Filename - the name of the file to rename
  • New name - the new name to give the specified file.

FTP Wait For File

This action is similar to the other Wait For actions. See this topic for details on set the polling frequency and timeout. The polling frequency for the FTP action must always be less than the server inactivity timeout, or the server will disconnect the FTP connection in between checking for the file.

The wait for file action waits for a file on the remote server. The file must be in the current directory (use the FTP Change Directory command to set the directory.)

You can wait for a file to:

  • Exist.
  • Not exist.
  • Change (this is when the file's size or date is different to the size/date when the action started.)
  • Stop Changing (this is when a file exists, and its size and date do not change in between two polling events. This is useful for telling when a file upload has finished.)

For Wait For Exist/Not Exist, you can use file wildcards (ie *.*) to check for groups of files.

In the case of Wait For Change/Stop Changing, you can set the action to fail if the file does not exist. Otherwise, the action will wait until the file exists and - in the case of Stop Changing - has stopped resizing.

FTP No-op

This action is used to keep the connection alive to the FTP server. If you connect to the FTP server at the start of the build, you may want to use the FTP No-op at certain points during your build so that the connection is maintained.  Many FTP servers will close the connection after a certain amount of time with no activity.

  • Connection Name - select the connection (see FTP Connect action)
  • Detailed FTP Logging - Outputs the raw FTP commands and log messages to the log

FTP Disconnect

This action is used to disconnect the specified FTP connection.  This action should be called after all FTP operations have completed so that the connection is not left open when the build ends.

  • Connection Name - select the connection (see FTP Connect action)
  • No labels