言語

FtpClientConnection.SendFiles(String[], String, Boolean, Boolean) メソッド

定義

ファイルをファイル転送プロトコル(FTP)サーバーに送信します。

public:
 void SendFiles(cli::array <System::String ^> ^ localFileNames, System::String ^ remotePath, bool overwrite, bool isTransferAscii);
public void SendFiles(string[] localFileNames, string remotePath, bool overwrite, bool isTransferAscii);
member this.SendFiles : string[] * string * bool * bool -> unit
Public Sub SendFiles (localFileNames As String(), remotePath As String, overwrite As Boolean, isTransferAscii As Boolean)

パラメーター

localFileNames
String[]

送信するFTPサーバー上のファイル。

remotePath
String

ファイルが存在するリモートパス。

overwrite
Boolean

ファイルがすでにリモートコンピュータに存在する場合、ファイルを上書きするかどうかを指定します。 trueの値は、タスクが既存のファイルを上書きすることを示します。

isTransferAscii
Boolean

ファイルをASCIIモードで送信すべきかどうかを指定します。 trueの値は、ファイルをASCIIモードで送信すべきであることを示します。

次のコード例は、 SendFiles メソッドの使用方法を示しています。

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);  
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)  

適用対象