ftstran - executes transmission
- Organization of this page
Format
ftstran transmission-card-name[/L file-name][/N file-name][/E file-name][/M [B|T]][/H host-name][transmission-information-option transmission-option-parameter]
Function
The ftstran command executes file transmission based on the information in a specified transmission card (Select Card method of file transmission) or by modifying information in a specified transmission card (Enter Information method of file transmission).
This command can be executed with the general user privilege.
Arguments
transmission-card-name ((1 to 20-byte character string))
Specifies the name of a transmission card that has been registered using Transmission Regist. & Exe.
/L file-name ((1 to 259-byte character string))
Specifies the name of the file to which the following log information is output when the ftstran command terminates:
Command termination time, return value, message, transmission card name, local file name, remote file name
Specify a file for which the user who executes the command has the write privilege. If this option is omitted, no log information is output.
If you specify a relative path for the file name, the command assumes the directory relative to the command execution directory.
If the size of the file exceeds 1 megabyte, file-name is renamed as file-name_old. If file-name_old already exists, the existing file is deleted before file-name is renamed as file-name_old.
The number of logs that can be stored in the file is as follows:
1 MB (length of transmission card name + length of local file name + length of remote file name + 122) + 1
/N file-name ((1 to 259-byte character string))
Specifies the name of the file to which the results are output when the transmission terminates normally. Specify a file for which the user who executes the command has the write privilege. If this option is omitted, transmission results are not output when the transmission terminates normally.
If you specify a relative path for the file name, the command assumes the directory relative to the command execution directory.
If a file with the same name exists, it is overwritten.
/E file-name ((1 to 259-byte character string))
Specifies the name of the file to which the results are output when the transmission terminates abnormally. Specify a file for which the user who executes the command has the write privilege. If this option is omitted, transmission results are not output when the transmission terminates abnormally.
If you specify a relative path for the file name, the command assumes the directory relative to the command execution directory.
If a file with the same name exists, it is overwritten.
/M [B|T]
Specifies the output format.
-
B: Binary format (data consisting of consecutive FTS_FTP_API_DATA_EX and FTS_FTP_API_RETDATA_EX structures)
-
T: Text format
/H host-name ((1 to 256-byte character string))
Specifies the host name (physical or logical host name) or IP address to be set as the transmission source IP address of the FTP client. When you specify an IP address, you can specify an IPv4 or IPv6 address.
If you have enabled specification of the FTP client's local IP address, the value specified in this option becomes the FTP client's local IP address. If you omit this option, the address of the FTP client's physical host is assumed.
If you have disabled specification of the FTP client's local IP address, the address that is assigned automatically by the OS becomes the FTP client's local IP address.
For details about how to enable specification of the FTP client's local IP address, see 3.11 Using JP1/FTP in a multiple IP address environment.
transmission-information-option transmission-option-parameter
Specifies desired options in order to modify some of the transmission information on the specified transmission card (Enter Information method of file transmission). For details about the transmission information options, see ftsregc - registers, changes, deletes, and displays transmission information in this chapter. For details about the transmission option parameters for the transmission information options, see 3.4.1 Registering transmission information onto a transmission card.
Return values (decimal number)
0 |
Normal termination. |
10XXXXX |
Normal termination with a warning due to an open error on the transmission-end information storage file. The CreateFile function's extended error information is set in XXXXX. |
11XXXXX |
Normal termination with a warning due to an output error on the transmission-end information storage file. The WriteFile function's extended error information is set in XXXXX. |
12XXXXX |
Normal termination with warning due to a JP1/FTP connection release error. The last byte of the fts_ftp_close function's extended error information is set in XXXXX. |
1300000 |
Abnormal termination due to unacquired card information. |
50XXXXX |
Abnormal termination due to an error in fts_ftp_open_ex(). The last byte of the fts_ftp_open_ex function's extended error information is set in XXXXX. |
51XXXXX |
Abnormal termination due to an error in fts_ftp_syn_request_ex(). The last byte of the fts_ftp_syn_request_ex function's extended error information is set in XXXXX. |
52XXXXX |
Abnormal termination due to an error in WSAStartup(). The WSAStartup function's extended error information is set in XXXXX. |
9000000 |
Abnormal termination of transmission. |
9000001 |
Abnormal termination due to an argument specification error. |
9900000 |
Abnormal termination (logical error). |
For details about the messages that are displayed, see 8.3.1 Messages displayed during execution of the ftstran command.
Usage examples
-
Example of the Select Card method of file transmission:
-
Example of the Enter Information method of file transmission:
This example changes the following transmission information on card1 and then executes transmission:
-
/TC: The name for the new card is card2.
-
/TH: The connection-target host name is host1.
-
/TT: The send/receive type is SEND.
-
/TY: The transmission mode is BINARY.
-
/TL: The local file name is c:\temp\file1.
-
/TR: The remote file name is c:\temp\file2.
-