FTP / SFTP command

Use this command to automate any FTP or SFTP operations.

FTP (File Transfer Protocol) is a standard network protocol used to transfer files from one host to another host over a TCP-based network, such as the Internet. The FTP/SFTP command can automate the following:

  • File uploads and downloads
  • Back up websites
  • Secure FTP for secure remote file transfer
Note: SFTP with SSH1 protocol is no longer supported by SFTP.

To use this command, ensure that Visual C++ Redistributable for Visual Studio 2015 is installed on the Enterprise Client machine. Download the redistributable from the Microsoft website: https://www.microsoft.com/en-in/download/details.aspx?id=48145

To learn more, search for the Automating File Transfer Using the FTP Command course in Automation Anywhere University: RPA Training and Certification (A-People login required).

Connect
Connects to the FTP/SFTP server.
Specify the FTP/SFTP Server name, User Name, and Password.
  • You can use variables in the FTP Server, User Name, Password, and Port Number fields.

    The variable support for the Port Number field is applicable from Version 11.3.1 onwards.

  • To test the connection, enter an actual value instead of a variable in all the fields where you have inserted a variable.
  • Press the F2 key to insert a Credential Variable for enhanced security. See Assigning credential variables from credential lockers.

You can also select any of the following options:

  • Anonymous login
    Note:
    • Anonymous login is not supported for SFTP.
    • If the Anonymous login option is selected, it will not allow the user to enter the username and password.
  • Secure FTP: Select this option to use secure FTP. This will also enable you to opt for Key File Authentication.
  • Key File Authentication: Select this option to use a private key file for SFTP connection. Ensure the FTP server has a corresponding public key file.

    Note:
    • Not supported: When SFTP is configured on a Windows server, Key File Authentication and Normal User Authentication connections with the Enterprise Client system are not supported.
    • Supported: When SFTP is configured on a UNIX server, Key File Authentication and Normal User Authentication connections using the Enterprise Client system are supported.

    Test the connection to ensure all parameters work.

Advanced View: Use this option to set advanced connection options. You can specify the number of reconnection attempts, time between each attempt, transfer mode, transfer type, and default directory path.
Note: Transfer Mode, Transfer Type, and Directory options are available only if you are using an FTP connection.
Disconnect
Terminates the connection to an FTP/SFTP server.
Put Files
Uploads one or more files from a folder.
Get Files
Downloads one or more files to a local machine from an FTP/SFTP folder.
The FTP/SFTP command also offers advanced operations for working with files based on the date they are created or modified.
Put Folder
Uploads an entire folder from a local machine to an FTP/SFTP server.
You can specify filters using wildcard characters to restrict uploads to specific types of files.
Get Folder
Downloads an entire folder from an FTP/SFTP server to a local machine.
You can specify filters using wildcard characters to download only specific types of files.
You can also specify folders based on the date they are created or modified.
Delete Files
Deletes one or more files from an FTP/SFTP folder.
Rename Files
Renames one or more files in an FTP/SFTP folder.
Create Folder
Creates a folder on an FTP/SFTP server.
Delete Folder
Deletes a folder (including all subfolders and files within it) from an FTP/SFTP server.
Change Folder
Moves to a different folder on an FTP/SFTP server.
Use this option to download or upload files in more than one directory on your FTP/SFTP server.