0 votes
by (140 points)
edited

i am facing problem in getting server directory.i am able to connect to server but i am not understand which method i use to get server files and folder for downloading. please help me how can i get server files and folder which are permitted for download..

Thanks in advance.

Applies to: Rebex FTP/SSL

1 Answer

0 votes
by (147k points)
edited

I'm afraid we need to know which files and folders you wish to download before first.

Have you seen our tutorial about how to upload or download a single file, how to upload or download multiple files and how to get a list of files and folders? These should provide some information to get you started.

Or, if you just wish to download all server files and folders, call the GetFiles method with "*" argument:

// create client, connect and log in 
Ftp client = new Ftp();
client.Connect("ftp.example.org");
client.Login("username", "password");

// download all files to the specified local path (such as "c:\data\ftp")
client.GetFiles("*", localPath, FtpBatchTransferOptions.Recursive);
...