FTP Upload

From PresenceWiki
Revision as of 07:10, 23 June 2010 by Admin (Talk | contribs)

Jump to: navigation, search

FTP Upload Node

This Node instructs Presence to transfer one or more files to a remote server via FTP (File Transfer Protocol).

Possible uses include:

  • Synchronizing a remote website with the local filesystem
  • Moving files into a remote "drop folder" where another process handles them

Dragging an FTP Upload Node into your Task launches the FTP Upload editor:


The Editor is split into two tabs:

General Tab

Local File Location

This is the path of the local file that is to be transferred. It can be a static value (e.g. c:\myfiles\document.txt), a variable reference (e.g. ${myfile}) or a data table column reference (e.g. :var{FILENAME}).

If a data table column reference is used and multiple (distinct) rows are present in the data table, each variant value will be used as the basis of forming the filename. For example, consider the following datatable:


In this instance, using the reference :var{FILENAME} will cause the FTP Upload Node to attempt to upload each of these files in turn.

FTP Connection

This is the FTP Connection Resource that the node should use to establish the connection to the remote server. This encapsulates details of the connection such as the server host name, the username and password etc. If you have not already configured the resource you can do so now by right clicking in the selection box and selecting "Create New > FTP Connection" from the pop-up menu. Note that you must first select a valid directory:


This allows you to configure a new FTP Connection Resource.

Remote File Location

This is the remote directory that Presence should upload the selected files to. As with the local file location, it can be a static value, a variable reference or a data table column reference.

Clicking the "Browse" button will connect to the FTP server and display a tree-view of the remote directory structure to better allow you to select the correct path.


Use Binary Transfer Mode

This tells the FTP client that the files being transferred are Binary and prevents the server from attempting to modify newline characters.

Error Handling Tab

This Tab allows you to control how Presence should handle errors that occur during file transfer.

The default behaviour is to gracefully ignore any problems encountered. This means that the Task will carry on even though files may not have been successfully transferred.


Raise Exception on File Transfer Failure

When this option is selected the Task will raise an error if a file fails to transfer and no further upload attempts will be made. This can be caught and handled with an Error Handler Node.

Delete remote files after error

With this option selected Presence will ask the FTP server to delete any files that have already been transferred when an error occurs.

For example, consider the data table described above. Imagine that after transferring the first 3 files successfully, the server gives an error on the 4th file. Ordinarily Presence would either continue to upload the remaining files or, if "Raise Exception on File Transfer Failure" is selected, abandon the batch upload and throw an exception.

However if "Delete remote files after error" is selected, Presence will first attempt to delete the first 3 files on the remote server.

This behaviour is useful for automated processes that monitor the FTP drop folder, but not as useful for synchronizing files.

See Also

Task Elements : Action Task Elements : FTP Upload

Send Email | Send SMS | Send Fax | Broadcast Messages
Read Text File | Read Binary File | Write Text File | Write Binary File | Parse File Action
Rename File | Copy File | Delete File | Parse File Action
Generate Bar Code | Read Bar Code
Dynamic Task Call | Call Native Program | FTP Upload | Scorecard Collector | Create Graph | AS400 Action
Socket Client Action | Socket Server Action
JMS Producer | JMS Consumer

Task Elements | Resources