FTP Jobs: Delete Command Settings

This topic describes how to use the FTP Delete command. This command allows you to remove single files/directories or multiple files/directories from an FTP server using an Automic Automation FTP job. You can specify the exact path of a single file or directory to be deleted.

To Delete One or More Files or Directories

  1. In From/To, select the Connection objects that connect to the source and destination hosts.

  2. Drag the Delete command from the left pane and drop it onto the editor in the middle.

  3. In Path, do the following:

    1. Select a Connection object. This list displays the connection objects that you have selected at the top of the editor for the source and target hosts. .

      You can browse to a file or directory using the browse icon. When you click it, a pop-up dialog opens that allows you to browse to a file or directory on the host. For more information, see Browsing to Directories and Files.

    2. In Path, specify the absolute or relative path to change to. You can use the following wildcards here: * (matches any number of characters) and ? (matches one single character). If no wildcards are used, you must specify the exact path of a single file or directory to be deleted.

      Examples:

      • *.txt deletes all files with a .txt extension.

      • report.* deletes all files called report with any extension.

      • quarter? deletes all files called quarter followed by a single character.

      • ???? deletes all files that are exactly four characters long.

      Note:

      If you use wildcards and no files match the selection, the Delete command does not abort.

  4. In the Options section, do the following:

    1. If you do not want the Job to abort if this command fails, deselect Abort job on command failure.

    2. If you want to delete child directories and their files when they meet the wildcard criteria in the Path field, select Delete files recursively.

    3. If you select Delete files recursively, you can optionally choose to delete empty directories with the Delete empty directories option.

  5. Optionally add a description of the command under Description. The text you enter here is not written to the Job report. To write a message to the Job report, use an Echo command. For more information, see FTP Jobs: Echo Command Settings.

See also: