0

I'd like to download folder with c# FluentFTP library. The folder is downloaded but I'd like to have in my machine only the last folder in the given path.

List<FtpResult> res = client.DownloadDirectory(tmpFolder, "play_files\\test_folder\\", FtpFolderSyncMode.Update);
return res;

what I get in the local folder is a folder named play_files and a subfolder test_folder.

what I want to get , is just one folder test_folder and I'd like to know if is it possible to rename it or not.

hous
  • 2,577
  • 2
  • 27
  • 66

1 Answers1

0

I had the same issue and found the solution.
For remoteFolder, start with '/'.
For example, "/abc/def"not "abc/def".

client.DownloadDirectory(@"D:\download\", "/download/folder", FtpFolderSyncMode.Update, FtpLocalExists.Overwrite);
roapp
  • 530
  • 6
  • 17