Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

falcon00

foreach (RemoteFileInfo fileInfo in directory.Files)
{
if (!fileInfo.IsDirectory)
{
session.GetFiles(remoteFTPDirectory + fileInfo.Name, localPath + fileInfo.Name, false, transferOptions).Check();
}
}

Unless somebody has a better idea.
falcon00

How to prevent traversing subfolders

I have a process where I download every existing file in a directory. Say I have:

/readme.txt
/Pub

I only want readme.txt but with ListDirectory I get everything in Pub as well. Is there a way to prevent this drill down behavior?