Syntax:

SETPORT(port)

  • port: The port number. A value between 1 and 65535.

Remarks:

Changes will take effect the next time OPENHOST is invoked in the script.

See also:

OPENHOST
SETPROTOCOL

Return value:

This command always returns “OK”.

Examples:

# Connect to ftp.myhost.com using port 65002
SETPORT(65002)
OPENHOST("ftp.myhost.com","myuser","mypassword")
 
# Download all files and disconnect
GETFILE("*.*")
CLOSEHOST
# Connect to ftp.myhost.com using
# implicit FTPS on the 3024 port
SETPROTOCOL(FTPS_IMPLICIT)
SETPORT(3024)
OPENHOST("ftp.myhost.com","myuser","mypassword")
 
# Download all files and disconnect
GETFILE("*.*")
CLOSEHOST