언어

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)  

적용 대상