Reflection Desktop VBA Guide
Attachmate.Reflection.Objects.Emulation.OpenSystems Library / Attachmate.Reflection.Objects.Emulation.OpenSystems Library / FileTransfer Object / ZmodemReceiveFile Method
Specifies the local filename to use for the file. This string can contain drive and path information. It can also be just a folder name or an empty string, in which case the host filename is used to generate a local filename. This string cannot contain wildcard characters.
Specifies the remote filename to use for the file.
A TransferTypeOption value that specifies what type of file is being transferred. The default is TransferTypeOption.Binary. The possible values are: TransferTypeOption.ASCII Specifies an ASCII file transfer. If the XmodemTranslateCharacters property is set to true, the following translations are performed: Character set translations (as specified on the Emulation tab in the Terminal Setup dialog box) and relevant ASCII File Translation options (as specified on the Translation tab in the File Transfer Setup dialog box). If XmodemTranslateCharacters is set to False, record separator characters may still be translated to carriage return/linefeed sequences (if the ConvertSeparatorToEOL property is set to true), and a Ctrl+Z character may still be appended to the end of the file (if the WriteCtrlZAsEOF property is set to true), but no other translations are performed. TransferTypeOption.Binary Binary file transfer. Data in the file is not translated as it is transferred.
A DestinationFileExistsOption value that specifies what to do if the sent file already exists on the PC. The default is DestinationFileExistsOption.Cancel. The possible values are: DestinationFileExistsOption.AskUser Prompts the user to specify what should be done. DestinationFileExistsOption.Cancel Stops the transfer. DestinationFileExistsOption.Delete Deletes (overwrites) the existing file. DestinationFileExistsOption.Append Appends the data to the existing file. DestinationFileExistsOption.Rename Renames the file being transferred if a file of the same name already exists on the destination system. The last three characters of the existing filename are changed to 001. If such a file already exists, the filename is changed to 002, and so on, up to 999. DestinationFileExistsOption.Resume Resumes a canceled receive. If the file already exists on the PC, Reflection assumes it is there as the result of an aborted transfer. Reflection therefore resumes the transfer at the point of interruption. DestinationFileExistsOption.Update Performs the transfers only if the host file is newer than the PC file. DestinationFileExistsOption.UseRemote Uses the IfFileExists option specified by the remote system. If the remote system doesn't specify an IfFileExists , this option is equivalent to DestinationFileExistsOption.Cancel.
In This Topic
    ZmodemReceiveFile Method
    In This Topic
    Transfers one or more files from the host to the PC, using the Zmodem file transfer protocol.
    Syntax
    expression.ZmodemReceiveFile( _
       ByVal localFile As String, _
       ByVal remoteFile As String, _
       ByVal transferOption As TransferTypeOption, _
       ByVal fileOption As DestinationFileExistsOption _
    ) As ReturnCode
    where expression is a variable that represents a FileTransfer Object

    Parameters

    localFile
    Specifies the local filename to use for the file. This string can contain drive and path information. It can also be just a folder name or an empty string, in which case the host filename is used to generate a local filename. This string cannot contain wildcard characters.
    remoteFile
    Specifies the remote filename to use for the file.
    transferOption
    A TransferTypeOption value that specifies what type of file is being transferred. The default is TransferTypeOption.Binary. The possible values are: TransferTypeOption.ASCII Specifies an ASCII file transfer. If the XmodemTranslateCharacters property is set to true, the following translations are performed: Character set translations (as specified on the Emulation tab in the Terminal Setup dialog box) and relevant ASCII File Translation options (as specified on the Translation tab in the File Transfer Setup dialog box). If XmodemTranslateCharacters is set to False, record separator characters may still be translated to carriage return/linefeed sequences (if the ConvertSeparatorToEOL property is set to true), and a Ctrl+Z character may still be appended to the end of the file (if the WriteCtrlZAsEOF property is set to true), but no other translations are performed. TransferTypeOption.Binary Binary file transfer. Data in the file is not translated as it is transferred.
    fileOption
    A DestinationFileExistsOption value that specifies what to do if the sent file already exists on the PC. The default is DestinationFileExistsOption.Cancel. The possible values are: DestinationFileExistsOption.AskUser Prompts the user to specify what should be done. DestinationFileExistsOption.Cancel Stops the transfer. DestinationFileExistsOption.Delete Deletes (overwrites) the existing file. DestinationFileExistsOption.Append Appends the data to the existing file. DestinationFileExistsOption.Rename Renames the file being transferred if a file of the same name already exists on the destination system. The last three characters of the existing filename are changed to 001. If such a file already exists, the filename is changed to 002, and so on, up to 999. DestinationFileExistsOption.Resume Resumes a canceled receive. If the file already exists on the PC, Reflection assumes it is there as the result of an aborted transfer. Reflection therefore resumes the transfer at the point of interruption. DestinationFileExistsOption.Update Performs the transfers only if the host file is newer than the PC file. DestinationFileExistsOption.UseRemote Uses the IfFileExists option specified by the remote system. If the remote system doesn't specify an IfFileExists , this option is equivalent to DestinationFileExistsOption.Cancel.

    Return Value

    One of the following ReturnCode enumerated values.

    Member Description
    Cancelled Cancelled.
    Error Error.
    PermissionRequired Permission is required.
    Success Success.
    Timeout Timeout condition.
    Truncated The text is truncated.

    See Also