Xceed FTP Library Documentation
XceedFtp control reference / Methods / ReceiveMultipleFiles method
In This Topic
    ReceiveMultipleFiles method
    In This Topic

    Description

    Receive multiple files (or an entire directory structure) from the FTP server.

    This method will attempt to receive all remote files that match the path and file mask specified by the sRemoteFileMask parameter. See Wildcards . The files that end up being received are placed in the local folder specified by the sLocalFolder parameter.

    The remote file mask can be relative to the FTP server’s current working folder , or be an absolute path on the remote system.

    For each folder scanned for matching files, the ScanningFolder event is triggered. For each file that matches the file mask, the FileMatched event is triggered. When the scanning for matching phase is completed, the ReceivingFile is triggered right before each file is received. Handlers for the ReceivingFile event can rename or relocate each file being downloaded on a case-by-case basis. Once each file is being received, the FileTransferStatus event is triggered for each data packet received over the network.

    This method can only be used when the CurrentState property's value is fcsConnected.

    Parameters
     

    Parameter Description
    sRemoteFileMask  The file mask (path optional) of the remote files to receive.
    sLocalFolder  The path where to place the received files. Any received subfolders are recreated using this path as the root directory.
    bProcessSubfolders  Set to True to recursively scan remote subfolders to find files that match sRemoteFileMask, set to False to send only files directly located in the specified remote path without scanning subfolders

     

    Declaration  
    HRESULT ReceiveMultipleFiles
    (
    [in] BSTR sRemoteFileMask,
    [in] BSTR sLocalFolder,
    [in] VARIANT_BOOL bProcessSubfolders
    )

    Applicable properties

    AccountName, ListParsingFlags, LocalDataAddress, LocalDataPort, PassiveMode, RemoteDataAddress, RemoteDataPort, RepresentationType

    Events triggered

    FileMatched, FileTransferStatus, LoggingCommandLine, ParsingListLine, ProcessCompleted, ReceivingFile, ScanningFolder