Programming with Reflection

image\rwnprg32.gif WRQReceiveFile method


Syntax object.WRQReceiveFile LocalFile, RemoteFile, [TransferType], [IfFileExists], [Before], [Since], [Exclude]



Transfers one or more files from the host to the PC using the WRQ/Reflection file transfer protocol.

For example, the following command transfers the "Beach.bmp" file to the "C:\Windows" folder in the local PC. The transfer type is binary and if there are existing files with the same name on the PC, Reflection opens a dialog box that asks the user what action to take.

Session.WRQReceiveFile "C:\Windows", "Beach.bmp", rcBinary, rcAskUser


LocalFile Argument Type: String
Specifies a local file. This string can be empty or can contain just drive and path information, in which case the host file name is used to generate a local file name. This string cannot contain wildcard characters.

RemoteFile Argument Type: String
Specifies a host file. This string can contain wildcard characters (to transfer multiple files). The wildcard characters must be appropriate for the host system. You can also append "switches" to the host file name to modify the way the file is handled during the transfer; click here for more information about file name switches.

TransferType Argument Type: Enumeration
Specifies what type of file is being transferred. The default value is rcASCII. The possible values are:


 ASCII file transfer. Applies the ASCII File Translation options (as specified on the Translation tab in the File Transfer Setup dialog box) to the data in the file as it is transferred.


 Binary file transfer. Data in the file is not translated as it is transferred.


 Image/Labels transfer (rcLabels is a valid synonym).

IfFileExists Argument Type: Enumeration
Specifies what to do if the received file already exists on the PC. The default is rcCancel. The possible values are:


 Prompts the user to specify what should be done.


 Stops the transfer.


 Performs the transfer only if the host file is newer than the PC file.


 Deletes (overwrites) the existing file.


 Appends the contents of the host file to the existing PC file.


 Renames the file being transferred. The existing file retains the original name. The last three characters of the file being transferred are changed to 001. If such a file already exists, the file's name is changed to 002, and so on, up to 999.


 Skips the file (the transfer does not take place, but no error is returned).

Before Argument Type: Date/Time
Specifies a date and time. Only host files created or modified before the specified date and time are transferred.

Since Argument Type: Date/Time
Specifies a date and time. Only host files created or modified after the specified date and time are transferred.

Exclude Argument Type: String
Specifies one or more files to be excluded from a wildcard transfer. The file names can include wildcards.


image\jump.gif Keyword Index

image\popup.gif Related Topics

image\popup.gif Reflection products that use this command