RCVFILE Receive one or more files |
Top Previous Next |
This script command prepares FileLink to receive one or more files from the remote system.
The [ file name ] argument is required when one of the following file transfer protocols is used:
ASCII Xmodem Xmodem1K
In the cases of the other protocols, the [ file name ] argument is optional. If it is omitted, the remote system determines the name of file. The /fullpath option controls if the remote system also control over which directory the file is written to. If the [ file name ] argument is present, it overrides the name sent by the remote system.
When using a protocol that permits the remote system to supply the file name, it is possible multiple files may be sent in a single RCVFILE command. You must not override the remote file naming feature under such circumstances - namely, do not use the [ file name ] argument.
Consider the following example where FileLink waits one minute to receive a file from the remote system using the Zmodem protocol. Note that [ file name ] is not specified since the remote system specifies the local file name.
PROTOCOL "zmodem" /overwrite=Always /recovery=on RCVFILE /timeout=60
When [ file name ] is not specified, the name of the last file received is saved in the %lastfile variable. When a wildcard is used to transfer multiple files, the number of files received is stored in the %rcvfilecount variable.
Related Command(s): SENDFILE, PROTOCOL, LINEIN, LINEOUT, WORKINGDIR See also: Using the %lastfile Variable
|