FtpClientConnection.SendFiles(String[], String, Boolean, Boolean) メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
ファイル転送プロトコル (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)