FileZilla Pro CLI Error Handling

FileZilla Pro CLI sets an error flag when an error occurs while running a command.

To clear the error flag, use the clear command:

    fzcli> clear

To run a command only if the error flag is not set, prefix it with ?:

    fzcli> ?ls directory

To run a command even if the error flag is set and the option cli.error_handling is set as 2
skip if error flag is set, prefix it with !:

    fzcli> set cli.error_handling 2
    fzcli> !cd directory

Prefix a command with ^ and the error flag is not set in case of error:

    fzcli> ^mkdir directory

Example

  1. set cli.error_handling 2
  2. connect ftps://user:password@server.net
  3. set cli.error_handling 0
  4. ^mkir directory
  5. cd directory
  6. ?put fille.txt

  1. Set error handling to exit in case of error.
  2. Connect to a remote server. If connection fails, FileZilla Pro CLI exits.
  3. Set error handling to continue in case of error.
  4. Creates a directory. If the directory creation fails the error flag is not set.
  5. Change current directory. If changing the current directory fails the error flag is set
  6. Upload a file. Only runs if the error flag is not set

Tags: