FTP commands
These are some possible commands that can be used in FTP Command list:
Command
|
Description
|
CREATE DIR(<directory>)
|
Create a directory on the remote FTP host. A value must be supplied for the <directory>.
|
DELETE DIR(<directory>)
|
Delete a directory on the remote FTP host. A value must be supplied for the <directory>.
|
DELETE FILE(<file>)
|
Delete a file on the remote FTP host. A value must be supplied for the <file>.
|
RENAME FROM(<fromname>) TO(<toname>)
|
Rename a file on the remote FTP host. Values must be supplied for <fromname> and <toname>.
|
CHGDIR PATH(<new path>)
|
Change directory on the remote FTP host. A value must be provided for the <newpath>.
|
BINARY
|
Change to binary mode.
|
ASCII
|
Change to ASCII mode
|
QUIT
|
End the FTP session.
|
GET FROM(<remotepath>) TO(<localpath>) CONVERT(*YES/*NO) FROM_ENCODING(<fromcode>) TO_ENCODING(<tocode>) RECORD_DELIMITER(<*NONE/*LF/*CRLF) RECORD_SIZE(<size>) DATALINK(*PASV/*PORT)
|
GET a file from the remote FTP host and place on the local machine.
Refer to GET command.
|
PUT FROM(<remotepath>) TO(<localpath>) CONVERT(*YES/*NO) FROM_ENCODING(<fromcode>) TO_ENCODING(<tocode>) RECORD_DELIMITER(<*NONE/*LF/*CRLF) RECORD_SIZE(*NOMAX/<size>) DATALINK(*PASV/*PORT)
|
PUT a file from the local machine onto the remote FTP host.
Refer to PUT command.
|
|
GET command
Keyword
|
Value
|
Notes
|
FROM
|
value
|
Mandatory. Remote file path. For example: /ftp/orders
|
TO
|
value
|
Mandatory. Local file path. For example: /ftpin/orders
|
CONVERT
|
*NO *YES
|
Optional. Default is *NO (no conversion).
|
FROM_ENCODING
|
value
|
Optional. Only used if CONVERT(*YES) This is the encoding to convert the FROM file content to an intermediate Unicode string.
|
TO_ENCODING
|
value
|
Optional. Only used if CONVERT(*YES) This is the encoding to convert from the intermediate Unicode string to the target encoding.
|
RECORD_DELIMITER
|
*NONE *LF *CRLF
|
Optional. Only used if CONVERT(*YES). This specifies the end of record marker to be added to the end of each converted record read.
Default is *NONE.
|
RECORD_SIZE
|
value
|
Optional. The read size used on the source stream.
Default is 1024.
|
DATLINK
|
*PASV
*PORT
|
Optional. *PORT - use port mode when getting the file. *PASV - use passive mode when getting the file.
Default is *PASV.
|
|
PUT command
Keyword
|
Value
|
Notes
|
FROM
|
value
|
Mandatory. Local file path. For example: /outftp/orders
|
TO
|
value
|
Mandatory. Remote file path. For example: /orders
|
CONVERT
|
*NO
*YES
|
Optional. Default is *NO (no conversion).
|
FROM_ENCODING
|
value
|
Optional. Only used if CONVERT(*YES)
This is the encoding to convert the FROM file content to an intermediate Unicode string.
|
TO_ENCODING
|
value
|
Optional. Only used if CONVERT(*YES)
This is the encoding to convert from the intermediate Unicode string to the target encoding.
|
RECORD_DELIMITER
|
*NONE
*LF
*CRLF
|
Optional. Only used if CONVERT(*YES).
Default is *NONE.
This specifies the end of record marker to be added to the end of each converted record read.
|
RECORD_SIZE
|
Value
*NOMAX
|
The read size used on the source file. Optional. Defaults to 1024. *NOMAX sets the read size to the length of the source file.
|
DATLINK
|
*PASV
*PORT
|
Optional. Defaults to *PASV.
*PORT - use port mode when putting the file.
*PASV - use passive mode when putting the file.
|
|