Reflection Desktop VBA Guide
Attachmate.Reflection.Objects.Emulation.IbmHosts Library / Attachmate.Reflection.Objects.Emulation.IbmHosts Library / FileTransfer Object / INDSendFile Method
Specifies a local file. Unless you provide complete path information, only files in the current directory will be found. You cannot use wildcard characters to send multiple files the way you can by using the Transfer screen.
Specifies a name for the transferred file that complies with host file-naming conventions. You cannot use an empty string.

An INDFileTransferType value that specifies the type of file being transferred.

A fileExistsOption value that specifies what to do if the file specified in the HostFile argument already exists. This is a  FileExistsOption Enumeration value.
Displays the file transfer in the Progress window if set to true.
Example
In This Topic
    INDSendFile Method
    In This Topic
    Transfers a file from the PC to the host using the IND$FILE protocol.
    Syntax
    expression.INDSendFile( _
       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 local file. Unless you provide complete path information, only files in the current directory will be found. You cannot use wildcard characters to send multiple files the way you can by using the Transfer screen.
    hostFile
    Specifies a name for the transferred file that complies with host file-naming conventions. You cannot use an empty string.
    type

    An INDFileTransferType value that specifies the type of file being transferred.

    fileExistsOption
    A fileExistsOption value that specifies what to do if the file specified in the HostFile 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 sends a file to the host. Before you run the sample, make sure the cursor is on a TSO command line.
    Sub FileTransferSendSample()
     
        path = Environ$("USERPROFILE") & "\Documents\Micro Focus\Reflection\" & "test.txt"
        
        'Set the configuration to TSO
        ThisIbmTerminal.FileTransfer.XfrHostSys = HostSystem_Tso
        
        ThisIbmTerminal.FileTransfer.INDSendFile path, "bvtst02.test7.txt", INDFileTransferType_Ascii, FileExistsOption_Overwrite, True
        
    End Sub
    See Also