RCVFILE        Receive one or more files

Top  Previous  Next

Syntax:

RCVFILE

[ file name ]  [ /options ]

Arguments:

[ file name ]

Optional variable or string defining a file or path name; if no path is defined FileLinks working folder is used

Options:

/flush

Flush the receive buffer before starting a receive file operation.

 

/fullpath

If the protocol used allows the sender to define the name of the file received, use the full path name received (not just the name of the file).

 

/nostatus

Do not display send file status dialog box

 

/striplf

In ASCII file transfers only, remove line-feeds from before writing data to a file

 

/timeout=xx

Time-out in seconds to wait for a receive file operation to start; if xx is 0, FileLink waits indefinitely

 

/zwriteblock

Do not receive data while doing file writes (Zmodem protocol only); use only if connected at high speed and transmission errors occur

 

 

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