GetMultipleFiles Method  
 

Transfer multiple files from the server to the local system.

Syntax

object.GetMultipleFiles( LocalPath, RemotePath, [FileMask], [Reserved] )

Parameters

LocalPath
A string argument which specifies the name of the directory on the local system where the files will be stored. If a file by the same name already exists, it will be overwritten.
RemotePath
A string argument which specifies the name of the directory on the server where the files will be copied from. You must have permission to read the contents of the directory.
FileMask
An optional string argument which specifies the wildcard mask to be used when selecting what files should be transferred. If this argument is omitted, the value of the FileMask property will be used. The default value of an empty string indicates that all files in the specified directory should be downloaded. Typically, this argument is a wildcard mask that limits the files downloaded from the server to those which match a specific extension. For example, to download only those files that end in a ".dat" extension, the argument could be specified as "*.dat"
Reserved
An argument reserved for future expansion. This argument should always be omitted or specified as a numeric value of zero.

Return Value

A value of zero is returned if the operation was successful, otherwise a non-zero error code is returned which indicates the cause of the failure.

Remarks

The GetMultipleFiles method copies multiple files from the server to the local system. If the local 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

BufferSize Property, GetData Method, GetFile Method, PutData Method, PutFile Method, PutMultipleFiles Method, OnGetFile Event, OnProgress Event