Reflection .NET API
Attachmate.Reflection.Emulation.OpenSystems Assembly / Attachmate.Reflection.Emulation.OpenSystems Namespace / IFileTransfer Interface / KermitReceiveFile Method
Specifies a local file. This string can contain drive and path information. It can also be just a folder name, in which case the remote file name is used to generate a local file name. This string cannot contain wildcard characters. If this string is empty (""), the remote filename is used to generate a local filename.
Specifies a file on the remote system. This string can contain wildcard characters. If this string is empty (""), the filename must be specified by the remote Kermit program.
Specifies what type of file is being transferred. The TransferTypeOption.Binary option is generally appropriate for most transfers, including transfers from bulletin boards. Use TransferTypeOption.ASCII when you're sure you want characters translated. The possible values are: TransferTypeOption.ASCII Specifies an ASCII file transfer. If the KermitTranslateCharacters 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). · Relevant ASCII File Translation options (as specified on the Translation tab in the File Transfer Setup dialog box). If KermitTranslateCharacters 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 Specifies a binary file transfer. Data in the file is not translated as it is transferred.
Specifies what to do if the received file already exists on the PC. The possible values are: DestinationFileExistsOption.AskUser Prompts the user to specify what to do. 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. 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.


In This Topic
    KermitReceiveFile Method
    In This Topic
    Transfers one or more files from a remote computer running a Kermit program to the local computer, using the Kermit file transfer protocol.
    Syntax
    'Declaration
     
    
    Function KermitReceiveFile( _
       ByVal localFile As String, _
       ByVal remoteFile As String, _
       ByVal transferType As TransferTypeOption, _
       ByVal fileExists As DestinationFileExistsOption _
    ) As ReturnCode
    'Usage
     
    
    Dim instance As IFileTransfer
    Dim localFile As String
    Dim remoteFile As String
    Dim transferType As TransferTypeOption
    Dim fileExists As DestinationFileExistsOption
    Dim value As ReturnCode
     
    value = instance.KermitReceiveFile(localFile, remoteFile, transferType, fileExists)

    Parameters

    localFile
    Specifies a local file. This string can contain drive and path information. It can also be just a folder name, in which case the remote file name is used to generate a local file name. This string cannot contain wildcard characters. If this string is empty (""), the remote filename is used to generate a local filename.
    remoteFile
    Specifies a file on the remote system. This string can contain wildcard characters. If this string is empty (""), the filename must be specified by the remote Kermit program.
    transferType
    Specifies what type of file is being transferred. The TransferTypeOption.Binary option is generally appropriate for most transfers, including transfers from bulletin boards. Use TransferTypeOption.ASCII when you're sure you want characters translated. The possible values are: TransferTypeOption.ASCII Specifies an ASCII file transfer. If the KermitTranslateCharacters 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). · Relevant ASCII File Translation options (as specified on the Translation tab in the File Transfer Setup dialog box). If KermitTranslateCharacters 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 Specifies a binary file transfer. Data in the file is not translated as it is transferred.
    fileExists
    Specifies what to do if the received file already exists on the PC. The possible values are: DestinationFileExistsOption.AskUser Prompts the user to specify what to do. 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. 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.
    See Also