Skip to main content

         This documentation site is for previous versions. Visit our new documentation site for current releases.      

Connect-FTP method

Updated on August 16, 2022

Use this method to copy a file from one file system to another file system using File Transfer Protocol.


The Connect-FTP method has four parameters:

FTPServerSelect the name of an FTP server data instance to use for this file transfer.
RemoteFile Specify the relative path to the destination directory specified on the FTP service. Use forward slashes regardless of whether the FTP Service is running on Windows or Linux.

For example, if the FTP directory on the FTP service is set to c:\ftp, specify the relative path as a blank path between quotes:


If the c:\ftp directory on the fTP service has a documents directory under it, c:\ftp\documents, specify the relative path as:


You can enter a property name, property reference or expression that at runtime evaluates to the remote file path.

LocalFile Identify the source file path and file name. Use syntax appropriate to the operating system that hosts the Pega Platform server. If the path contains backslash characters, escape each backslash character by doubling it.

You can enter a property name, property reference or expression that at runtime evaluates to the local file path and name.

TransferMode Select ASCII for character-mode data transfers, or Binary for binary data. The default is ASCII.


The system uses information on the Environment tab of the FTP server data instance to log into the FTP server. Upon successful log-in, the system transfers the file identified in the LocalFile parameter to the filename and directory identified in the RemoteFile parameter, and then ends the FTP connection.

Checking the method status

This method updates the pxMethodStatus property. See How to test method results using a transition.


For an example use of this facility, see the Pega Community article How to copy files to remote systems using File Transfer Protocol.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best. is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us