Transfer Using Templates
You can perform file transfers by defining all required transfer parameters and options in transfer templates.
Using templates is a method to save your time. After creating a template, specify the Template | t parameter in the cfsend or cfrecv command.
Two sample templates called TSEND and TRECV are installed and located in the $CFROOT directory by default. For more details of the sample templates, see Sample Templates: TSEND and TRECV.
- You can simply send or receive a file. To perform such transfers, specify the TransferType | trtype parameter as F; or you do not have to set the TransferType parameter because this is the default transfer type.
- You can send or receive an executable file, and run the file as a job. To perform such transfers, set the TransferType | trtype parameter as J.
- You can send a command, and run it in a remote system. To perform such transfers, set the TransferType | trtype parameter as C.
- You can send a file, and run it as a print job. To perform such transfers, set the TransferType | trtype parameter as P.
When using the cfsend or cfrecv command with a template, you can also specify other transfer parameters on the command line. The parameters specified on a command line take higher precedence over parameters specified in a template.
See the following examples for your reference:
-
cfsend t:TSEND ip:10.1.1.130
In this example, the file defined in TSEND is the file sent to a file to the IP address 10.1.1.130, even if another IP address has been defined in the TSEND template.
-
cfsend t:TSEND n:dataServerB
In this example, the file defined in TSEND are sent to the dataServerB node, even if another node has been defined in TSEND template.Note: If you specify both a node and a template on a command line, the parameters specified in a node can override parameters specified in a template. As an exception, the IpName/Address and Port parameters specified in a template can override the HostName|h and Port|p parameters specified in a node. Therefore under this circumstance, it is good practice to mark the IpName/Address and Port parameters as comments in the template.