SetMode (FtpsClient object)


This method is defined only for the FtpsClient object. Any attempt to use this method with any other client object will result in a failure and run-time crash of your script.

function SetMode(mode): boolean

Accepted values for the mode parameter are:

  • ModeBinary: tells the FTP server we want a binary file transfer

  • ModeASCII: tells the FTP server we want an ASCII file transfer

The SetMode() sends a MODE command to the FTP server to request that the next file transfer(s) be operated either in binary ot ASCII mode. If the MODE request is successful, this function returns true, otherwise it returns false.


  var cli = new FtpsClient();
  cli.Host = '';
  cli.User = 'someusername';
  cli.PassFromSecret = 'my_secret_name';
  cli.TLS = TLSExplicit;
  if (cli.Connect()) {
    // perform your file transfers...
    // ...
    // ...
  cli = null