ZennoLab Assemblies Documentation
FtpDownload Method (ZennoPoster)
Example 

Type: System.String

Address of the FTP server.

Type: System.Int32

Port of the FTP server.

Type: System.String

The FTP protocol. It can be "FTP", "sFTP", or "FTPs".

Type: System.String

Login of the FTP server

Type: System.String

Password of the FTP server

Type: System.String

Proxy string in format: login:pass@ip:port OR ip:port

Type: System.String

File name.

Type: System.String

Destination path.

Download the file
Syntax
public static void FtpDownload( 
   string host,
   int port,
   string protocol,
   string login,
   string pass,
   string proxy,
   string name,
   string localPath
)

Parameters

host

Type: System.String

Address of the FTP server.
port

Type: System.Int32

Port of the FTP server.

protocol

Type: System.String

The FTP protocol. It can be "FTP", "sFTP", or "FTPs".

login

Type: System.String

Login of the FTP server

pass

Type: System.String

Password of the FTP server

proxy

Type: System.String

Proxy string in format: login:pass@ip:port OR ip:port

name

Type: System.String

File name.

localPath

Type: System.String

Destination path.

Example
The following example shows call the FtpDownload method.
var list = new System.Collections.Generic.List<string>(ZennoPoster.FtpGetList({host}, {port}, {login}, {password}, {proxy}, "", false, false));
foreach(var item in list)
    ZennoPoster.FtpDownload({host}, {port}, {protocol}, {login}, {password}, {proxy}, item, {directoryToSavePath});
$list = new System::Collections::Generic::List<string>(ZennoPoster::FtpGetList({host}, {port}, {login}, {password}, {proxy}, "", false, false));
foreach($item as $list)
    ZennoLab\CommandCenter\ZennoPoster::FtpDownload({host}, {port}, {protocol}, {login}, {password}, {proxy}, $item, {directoryToSavePath});
Requirements

Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.

See Also

Reference

ZennoPoster Class
ZennoPoster Members
FtpChmode Method
FtpCreateDirectory Method
FtpDeleteDirectory Method
FtpDeleteFile Method
FtpGetList Method
FtpUploadDirectory Method
FtpUploadFile Method

Send Feedback