Reflection Desktop VBA Guide
Attachmate.Reflection.Objects.Emulation.IbmHosts Library / Attachmate.Reflection.Objects.Emulation.IbmHosts Library / FileTransfer Object / INDReceiveFile Method
Specifies a name for the PC file that receives host data. Provide complete path information.
Specifies a host file.
An INDFileTransferType value that Specifies the type of file being transferred.
Specifies what to do if the file specified in the pcFile argument already exists.This is a FileExistsOption Enumeration value.
Displays the file transfer in the Progress window if set to true..
Example
INDReceiveFile Method
Transfers a file from the host to the PC using the IND$FILE protocol.
Syntax
expression.INDReceiveFile( _
   ByVal pcFile As String, _
   ByVal hostFile As String, _
   ByVal type As INDFileTransferType, _
   ByVal fileExistsOption As FileExistsOption, _
   ByVal showStatus As Boolean _
) 
where expression is a variable that represents a FileTransfer Object

Parameters

pcFile
Specifies a name for the PC file that receives host data. Provide complete path information.
hostFile
Specifies a host file.
type
An INDFileTransferType value that Specifies the type of file being transferred.
fileExistsOption
Specifies what to do if the file specified in the pcFile argument already exists.This is a FileExistsOption Enumeration value.
showStatus
Displays the file transfer in the Progress window if set to true..
Exceptions
ExceptionDescription
The exception that is thrown when a method call is invalid for the object's current state.
Remarks
If you're having trouble getting a transfer to work, make sure the XfrHostSys property is set to the appropriate value.
Example
This sample gets a file from the host. Before you run the sample, make sure the cursor is on a TSO command line.
Sub FileTransferReceiveSample()
 
    path = Environ$("USERPROFILE") & "\Documents\Micro Focus\Reflection\" & "fileName.txt"
    
    'Set the configuration to TSO
    ThisIbmTerminal.FileTransfer.XfrHostSys = HostSystem_Tso
    
    ThisIbmTerminal.FileTransfer.INDReceiveFile path, "count.txt", INDFileTransferType_Ascii, FileExistsOption_Append, True
         
End Sub
See Also