This documentation is archived and is not being maintained.

FtpClientConnection.SendFiles Method

Sends files to the File Transfer Protocol (FTP) server.

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

public void SendFiles (
	string[] localFileNames,
	string remotePath,
	bool overwrite,
	bool isTransferAscii
public void SendFiles (
	String[] localFileNames, 
	String remotePath, 
	boolean overwrite, 
	boolean isTransferAscii
public function SendFiles (
	localFileNames : String[], 
	remotePath : String, 
	overwrite : boolean, 
	isTransferAscii : boolean



The files on the FTP server to send.


The remote path where the files are located.


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


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

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

  Package pkg = new Package();
  Connections conns = pkg.Connections;
  ConnectionManager cm = conns.Add("FTP");
  FtpClientConnection myftpClientConn = new FtpClientConnection(cm);
  String[] localFileNames = { "myTestFile", "myFTPFile" };
  String remotePath = @"\\myserver\myFolder";
  myftpClientConn.SendFiles(localFileNames, remotePath, true, false);

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