Поделиться через


Метод FtpClientConnection.ReceiveFiles

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

Пространство имен:  Microsoft.SqlServer.Dts.Runtime
Сборка:  Microsoft.SqlServer.ManagedDTS (в Microsoft.SqlServer.ManagedDTS.dll)

Синтаксис

'Декларация
Public Sub ReceiveFiles ( _
    remoteFileNames As String(), _
    localPath As String, _
    overwrite As Boolean, _
    isTransferAscii As Boolean _
)
'Применение
Dim instance As FtpClientConnection 
Dim remoteFileNames As String()
Dim localPath As String 
Dim overwrite As Boolean 
Dim isTransferAscii As Boolean

instance.ReceiveFiles(remoteFileNames, _
    localPath, overwrite, isTransferAscii)
public void ReceiveFiles(
    string[] remoteFileNames,
    string localPath,
    bool overwrite,
    bool isTransferAscii
)
public:
void ReceiveFiles(
    array<String^>^ remoteFileNames, 
    String^ localPath, 
    bool overwrite, 
    bool isTransferAscii
)
member ReceiveFiles : 
        remoteFileNames:string[] * 
        localPath:string * 
        overwrite:bool * 
        isTransferAscii:bool -> unit
public function ReceiveFiles(
    remoteFileNames : String[], 
    localPath : String, 
    overwrite : boolean, 
    isTransferAscii : boolean
)

Параметры

  • remoteFileNames
    Тип: array<System.String[]
    The files on the FTP server to receive.
  • localPath
    Тип: System.String
    The local path where you want to receive the remote files.
  • overwrite
    Тип: System.Boolean
    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.
  • isTransferAscii
    Тип: System.Boolean
    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); 
Dim remoteFileNames() As String = {"myTestFile", "myFTPFile"}
Dim localPath As String =  "Program Files" 
myftpClientConn.ReceiveFiles(remoteFileNames, localPath, True, True)

См. также

Справочник

FtpClientConnection Класс

Пространство имен Microsoft.SqlServer.Dts.Runtime