Programming with Reflection

image\rwnprg32.gif WRQSendFile method

 

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

 

Description

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

For example, the following command transfers all *.doc files in the current folder to the host the same names on the host. The transfer type is binary and any existing files on the host will be overwritten.

Session.WRQSendFile "*.doc", "", rcBinary, rcDelete

Arguments

LocalFile Argument Type: String
Required
Specifies a local file. This string can contain PC wildcard characters (to transfer multiple files).

RemoteFile Argument Type: String
Required
Specifies a host file. This string cannot contain wildcard characters. If this string is an empty string (""), the local file name is used to generate the host file name. 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
Optional
Specifies what type of file is being transferred. The default is rcASCII. The possible values are:

 rcASCII

 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.

 rcBinary

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

 rcImage

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

 rcAutoDetect

 File transfer type is determined by the file extension. Use these properties to determine which file extensions are linked to which transfer type:

TransferAutoDetectDefaultType

TransferAutoDetectASCIIExtensionList

TransferAutoDetectBinaryExtensionList

TransferAutoDetectImageLabelsExtensionList

TransferAutoDetectScanExtensionList

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

 rcAskUser

 Prompts the user to specify what should be done.

 rcCancel

 Stops the transfer.

 rcUpdate

 Performs the transfers only if the local file is newer than the host file.

 rcDelete

 Deletes (overwrites) the existing file. For VMS host files, this option purges all earlier instances of the same file. For HP host files, this option performs a file purge any host file of the same name.

 rcOverwrite

 For transfers to an HP host, rcOverwrite replaces the data in a file, but doesn't change the file's attributes (characteristics). This can be a problem in overwriting a smaller file with a larger one, because the rcOverwrite option will not allocate new records to accommodate the additional data. Use rcDelete in such cases.

For transfers to a VMS host, rcOverwrite replaces only the most recent instance of the file on the host (use rcDelete to delete all earlier instances of the file).

 rcAppend

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

 rcRename

 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.

 rcSkip

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

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

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

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

Attributes Argument Type: String
Optional
Specifies host file attributes to be used. If this argument is omitted, default host file attributes are used.

 

image\jump.gif Keyword Index

image\popup.gif Related Topics

image\popup.gif Reflection products that use this command