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.

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.

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".

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.

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.

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.

FTP Get File Size

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

FTP Create Directory

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

FTP Delete Directory

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

FTP Delete File

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

FTP Rename File

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

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:

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.

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.