SocketTools .NET Edition

FtpClient.PutMultipleFiles Method (String, String)

Upload multiple files from the local system to the server using a wildcard mask.

[Visual Basic]
Overloads Public Function PutMultipleFiles( _
   ByVal localPath As String, _
   ByVal remotePath As String _
) As Boolean
[C#]
public bool PutMultipleFiles(
   string localPath,
   string remotePath
);

Parameters

localPath
A string argument which specifies the name of the directory on the local system where the files will be copied from. You must have permission to read the contents of the directory.
remotePath
A string argument which specifies the name of the directory on the remote system where the files will be stored. You must have permission to modify the contents of the directory and create files.

Return Value

This method returns a boolean value. If the method succeeds, the return value is true. If the method fails, the return value is false. To get extended error information, check the value of the LastError property.

Remarks

The PutMultipleFiles method copies multiple files from the local system to the remote server. If the remote file already exists, it is overwritten. This method will cause the current thread to block until all of the files have been transferred, a timeout occurs or the transfer is canceled. During the transfer, the OnProgress event will fire periodically, enabling the application to update any user interface objects such as a progress bar.

See Also