FTP Jobs: Free Form Command Settings

This topic describes how to use FTP Free Form commands. These commands allow you to define your own commands using static commands and/or Automation Engine variables.

To Define a Free Form Command Command

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

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

  3. In Free Form, 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.

    2. In Commands, enter your commands.

      When spaces are included in directories or files, double quotes " " should surround the entire argument.

      This box allows Automation Engine variables in the following format: &<name>#.

      Important!

      Empty lines are not allowed and will cause the Job to fail.

  4. In the Options section, do the following:

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

    • If you want the Job to abort when source file(s) are not found, select Abort job when source file(s) not found (only used for put and get commands) box.

  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.

FTP, FTPS, and FTPES Commands

The following FTP, FTPS, and FTPES commands are allowed:

  • ascii
  • Sets the mode of the file transfer to ASCII.

  • binary
  • Sets the mode of the file transfer to binary.

  • image
  • Sets the type to image, where the data is sent as contiguous bits, which, for transfer, are packed into the 8-bit transfer bytes.

  • ebcdic
  • Sets the type to EBCDIC to use EBCDIC for their internal character representation.

  • local
  • Sets the type to local, where the data is transferred in logical bytes of the size specified by the obligatory second parameter, byte size.

  • get remote-path [local-path] [ERASE]
  • Downloads a file.

    Includes the option to erase the source on successful transfer by entering the ERASE attribute at the end of the command.

  • put local-path [remote-path] [ERASE]
  • Uploads a file.

    Includes the option to erase the source on successful transfer by entering the ERASE attribute at the end of the command.

  • mget remote-path [local-path] [ERASE]
  • Downloads multiple files.

    Includes the option to erase the source on successful transfer by entering the ERASE attribute at the end of the command.

  • mput local-path [remote-path] [ERASE]
  • Uploads multiple files.

    Includes the option to erase the source on successful transfer by entering the ERASE attribute at the end of the command.

  • site arg1 [ arg2 ] ...
  • Initiates a site command with argument(s).

  • namelis [remote-directory]
  • Runs an NLST command on a remote directory.

  • ls [remote-directory]
  • Displays an abbreviated list of files and subdirectories in a remote directory.

  • dir [remote-directory]
  • Views a remote directory.

  • pwd
  • Displays a remote working directory.

  • cwd
  • Changes the working directory.

  • cd
  • Changes the working directory on the remote computer.

  • lcd
  • Changes the working directory on the local computer.

  • account password
  • Password for system login.

  • allocate bytes
  • Allocates bytes for a file storage on the remote computer.

  • mkdir directory-name
  • Creates a specified directory on the remote computer.

  • rmdir directory-name
  • Removes a specified directory on the remote computer.

  • rename from to
  • Renames a remote file.

  • move from to
  • Moves a remote file.

  • delete remote-file
  • Deletes a remote file.

  • rm remote-file
  • Removes a remote file.

  • append local-file [remote-file]
  • Appends a file to a file of same name on the remote computer.

  • transfermode [stream|compressed|block]
  • Sets the transfer mode.

  • filestructure [file|page|record]
  • Sets the file structure.

In order to accommodate the FTP Agent's design, there are additional features added to standard FTP, specifically CANCEL and ERASE.

  • CANCEL means that the file transfer will abort. Where multiple files are transferred, this is done on a case by case basis.

  • ERASE means that the source file is deleted after the file transfer is complete.

SFTP Commands

The following SFTP commands are allowed:

  • cd path
  • Changes the remote directory to 'path'.

  • lcd path
  • Changes the local directory to 'path'.

  • chgrp grp path
  • Changes the group of file 'path' to 'grp'.

  • chmod mode path
  • Changes the permissions of file 'path' to 'mode'.

  • chown own path
  • Changes the owner of file 'path' to 'own'.

  • help
  • Displays this help text.

  • get remote-path [local-path] [ERASE]
  • Downloads a file.

    Includes the option to erase the source on successful transfer by entering the ERASE attribute at the end of the command.

  • lls [path]
  • Displays the local directory listing.

  • ln oldpath newpath
  • Symlinks a remote file.

  • lpwd
  • Prints the local working directory.

  • ls [path]
  • Displays the remote directory listing.

  • mkdir path
  • Creates a remote directory.

  • put local-path [remote-path] [ERASE]
  • Uploads a file.

    Includes the option to erase the source on successful transfer by entering the ERASE attribute at the end of the command.

  • pwd
  • Displays the remote working directory.

  • stat path
  • Displays info about path.

  • rename oldpath newpath
  • Renames a remote file.

  • rmdir path
  • Removes a remote directory.

  • rm path
  • Deletes a remote file.

  • symlink oldpath newpath
  • Symlinks a remote file.

  • readlink path
  • Checks the target of a symbolic link.

  • realpath path
  • Canonicalizes the path.

  • rekey
  • Key re-exchanging.

  • compression level
  • Packet compression will be enabled.

See also: