This section describes the uxstr FTP PUT command used to send files to a FTP server.
This command will send one or more files to an FTP server.
Note: The CRLF option is not available for FTP PUT.
The syntax is as follows:
uxstr FTP PUT PARTNER=hostname [ORIGIN_FILENAME=filename] [ORIGIN_PATHNAME=path] [TARGET_FILENAME=filename] [TARGET_PATHNAME=path] [LOGON=username] [PASSWORD=password] [MODE=ASCII|BINARY] [ACTION=REPLACE|ABORT|APPEND|NONE] [DELETE|NODELETE] [NEWER|NONEWER] [RECURSIVE|NORECURSIVE] [BUFFER_SIZE=nn] [RETRY=n]
Description of Items
PARTNER=
Physical name or IP address of the target machine.
Format: 255 alphanumeric characters.
ORIGIN_FILENAME=
(Optional) Name of the remote file to send to the FTP server.
Format: 256 alphanumeric characters.
Default: all files in the directory.
ORIGIN_PATHNAME=
(Optional) Name of the local folder from which files are to be sent.
Format: 256 alphanumeric characters. * forbidden. Note that paths must be given like FTP paths, meaning that a path like "C:\Temp\Transfer" should be written: "C:/Temp/Transfer".
Default: the FTP connection user’s home directory.
TARGET_FILENAME=
(Optional) Name of the file on the FTP server, only when a single file is to be transferred.
Format: 256 alphanumeric characters.
Default : Unchanged.
TARGET_PATHNAME=
(Optional) Name of the destination folder on the FTP server to which files will be sent.
Format: 256 alphanumeric characters.* forbidden.
Default: the home directory of the Uproc submission user account.
LOGON=
(Optional) FTP connection user.
Format: 32 alphanumeric characters.
Default: anonymous
PASSWORD=
(Optional) FTP connection user password. Passwords are invisible in the GUI.
Format: 32 alphanumeric characters.
MODE=
(Optional) Type of transfer (ASCII or BINARY)
Default: ASCII
ACTION=
(Optional) Behavior if the target file exists:
Default: ABORT
DELETE | NODELETE
(Optional) Origin file deletion
Default: NODELETE:
NEWER | NONEWER
(Optional) Check on the file date
Default: NONEWER
Warning! This option is not supported by SFTP by default. To see if SFTP has been configured, see the node setting U_FT_SFTP
RECURSIVE | NORECURSIVE
(Optional) Transferred files
Default: NORECURSIVE.
The RECURSIVE option uses the FTP LIST command internally to get a list of files and directories on the remote server. The expected server answer must be formatted so each line starts with the file permissions in UNIX format. Since this answer varies from a server to another, the feature will not work if the answer has a different format. Should this happen, a fail-over option is available: it tests each single file on the specified remote server location with a FTP CWD command to check the existence of a directory. The fail-over option is less performing but it can be enabled with the U_FT_GET_DIR_FAILOVER node setting in the "Node Settings – FTP Settings" category.
When retrieving a directory in RECURSIVE mode using an FTP_GET Uproc, the Append mode is not supported, the Abort action is used by default.
BUFFER_SIZE=
(Optional) Sets the communications buffer size in blocks of 512 bytes.
Format: integer/2n between 1 and 64.
Default: FTP default
RETRY=
(Optional) Number of retries in case of failure.
Format: one digit.
Example
Sends the /tmp/data.txt file to the hp10201 target host, but aborts the transfer if the file already exists:
uxstr FTP PUT ”hp10201” ORIGIN_FILENAME=”data.txt” TARGET_PATHNAME=”/tmp/” ACTION=ABORT