Skip to main content

Create FTP Connection

Command description

Creates an FTP or SFTP file server connection and returns the connection object. This connection object is required for subsequent FTP operations.

Command Input Parameters

input parametersInput parameter typeDescription
Server TypeenumOptional values: FTP Server, SFTP Server
FTP Server AddressstrFile server IP address or domain name
FTP Server Portint or strFile server port, default 21
Enable Active ModeboolWhether to enable FTP active connection, not enabled by default
UsernamestrFile server login account
PasswordstrFile server login password
Connection Timeoutnumber or strTimeout for connecting to the server, in seconds

Command Output Parameters

Output parametersOutput parameter typeDescription
FTP Connection ObjectFtpConnectionCreated FTP/SFTP connection object

Generation Notes

  • Output FTP connection object; subsequent FTP commands pass this object.
  • SFTP usually uses port 22, and FTP usually uses port 21.