Xceed .NET Libraries Documentation
SendMultipleFiles Method


Xceed.Ftp Assembly > Xceed.Ftp Namespace > FtpClient Class : SendMultipleFiles Method
The full path and file mask of the local files to send. This parameter can include a filtering mask to limit the files that are sent. For example, if "c:\temp\*" is specified, the entire contents of the "c:\temp" will be sent. If "c:\temp\*.txt" is used, all the files in the "c:\temp" folder that have the TXT extension will be sent. The "temp" folder will not be recreated on the FTP server.
true if the files in child folders should also be sent; false otherwise.
true if the local directory structure should be recreated on the FTP server; false otherwise.
Sends the files that match the provided file mask to the FTP server's current working folder.
Syntax
'Declaration
 
Public Sub SendMultipleFiles( _
   ByVal localFileMask As String, _
   ByVal recursive As Boolean, _
   ByVal recreateFolderStructure As Boolean _
) 
'Usage
 
Dim instance As FtpClient
Dim localFileMask As String
Dim recursive As Boolean
Dim recreateFolderStructure As Boolean
 
instance.SendMultipleFiles(localFileMask, recursive, recreateFolderStructure)
public void SendMultipleFiles( 
   string localFileMask,
   bool recursive,
   bool recreateFolderStructure
)

Parameters

localFileMask
The full path and file mask of the local files to send. This parameter can include a filtering mask to limit the files that are sent. For example, if "c:\temp\*" is specified, the entire contents of the "c:\temp" will be sent. If "c:\temp\*.txt" is used, all the files in the "c:\temp" folder that have the TXT extension will be sent. The "temp" folder will not be recreated on the FTP server.
recursive
true if the files in child folders should also be sent; false otherwise.
recreateFolderStructure
true if the local directory structure should be recreated on the FTP server; false otherwise.
Exceptions
ExceptionDescription
Cannot perform the requested operation because the FTP client is in an invalid state.
An error reply was returned by the FTP server.
An I/O error has occurred.
A fatal FTP-specific error has occurred..
Remarks

The files that match the provided file mask will be sent to the current working folder. If you want to send the files to another location, you could use the ChangeCurrentFolder and/or ChangeToParentFolder methods to change the current working folder.

The current working folder can be retrieved via the GetCurrentFolder method.

By default, if an error occurs during the multiple-file transfer, the entire operation will be aborted. To change this behavior, the MultipleFileTransferError event must be handled and its Action property set to either Retry or Ignore.

The SendMultipleFiles method will send the STOR and PASV or PORT commands and optionally the PWD, TYPE, ALLO, CWD and MKD commands to the FTP server.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

FtpClient Class
FtpClient Members