Export (0) Print
Expand All

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 Sub SendFiles ( _
	localFileNames As String(), _
	remotePath As String, _
	overwrite As Boolean, _
	isTransferAscii As Boolean _
Dim instance As FtpClientConnection 
Dim localFileNames As String()
Dim remotePath As String 
Dim overwrite As Boolean 
Dim isTransferAscii As Boolean

instance.SendFiles(localFileNames, remotePath, _
	overwrite, isTransferAscii)


Type: String()
The files on the FTP server to send.
Type: String
The remote path where the files are located.
Type: Boolean
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.
Type: Boolean
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.

  Dim pkg As New Package()
  Dim conns As Connections = pkg.Connections
  Dim cm As ConnectionManager = conns.Add("FTP")
  Dim myftpClientConn As New FtpClientConnection(cm)
  Dim localFileNames() As String = {"myTestFile", "myFTPFile"}
  Dim remotePath As String = "\\myserver\myFolder"
  myftpClientConn.SendFiles(localFileNames, remotePath, True, False)

Community Additions

© 2015 Microsoft