This documentation is archived and is not being maintained.

FtpClientConnection.ReceiveFiles Method

Receives files from the File Transfer Protocol (FTP) server.

Namespace: Microsoft.SqlServer.Dts.Runtime
Assembly: Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)

public void ReceiveFiles (
	string[] remoteFileNames,
	string localPath,
	bool overwrite,
	bool isTransferAscii
public void ReceiveFiles (
	String[] remoteFileNames, 
	String localPath, 
	boolean overwrite, 
	boolean isTransferAscii
public function ReceiveFiles (
	remoteFileNames : String[], 
	localPath : String, 
	overwrite : boolean, 
	isTransferAscii : boolean



The files on the FTP server to receive.


The local path where you want to receive the remote files.


Specifies whether to overwrite the files, if the files already exist on the local computer. A value of true indicates that the task will overwrite existing files.


Specifies if files should be received in ASCII mode. A value of true indicates that the files should be received in ASCII mode.

Wild-card characters are allowed. For example, receiving from a remoteFileNames of /MyFolder/MyFiles*.* will retrieve from all files in the MyFolder directory that start with the characters MyFiles.

The following code example shows how to use the ReceiveFiles method.

String [] remoteFileNames = {"myTestFile", "myFTPFile"};
String localPath = "Program Files";
myftpClientConn.ReceiveFiles(remoteFileNames, localPath, true, true); 

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

Target Platforms