Connect-to-FTP-Server
Command Description
Connect to the FTP server of specified attributes, and set it as the control object
Command Prototype
objFTP = FTP.Connect(sHostName,sUser,sPassword,bSsl,nPort,bAnonymous,nFTPSMode,optionArgs)
Parameter Description
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| sHostName | True | string | "" | Server address |
| sUser | True | string | "" | Login user name |
| sPassword | True | string | "" | Login password |
| bSsl | True | boolean | None | Use SSL to encrypt the connection. The default is No |
| nPort | True | number | 21 | Connection port, like 21, 22 |
| bAnonymous | True | boolean | None | You can login anonymously. Default is no |
| nFTPSMode | True | enum | 1 | FTP connection mode |
| sftp | None | boolean | None | Use SFTP protocol to encrypt the connection, the default is "No" |
| private_key | None | path | '''C:\Users''' | The storage path of key file |
return
objFTP,The variable used to save the output of the command.
Demo