File mask in EnumerateRemoteFiles
Hi,
I have the following use case: I need to pick up all .pdf files from a FTP location root folder, but I need to exclude one folder, called Refference.
Code:
My mask is not ok, because now it excludes all files.
Testing:
When running without the part, i get all the files, correctly, but when I add it, nothing is listed. How should I format my mask?
Thank you.
Silviu
I have the following use case: I need to pick up all .pdf files from a FTP location root folder, but I need to exclude one folder, called Refference.
Code:
IEnumerable<RemoteFileInfo> directoryInfo = session.EnumerateRemoteFiles("/", "*.pdf |*/Reference/", EnumerationOptions.AllDirectories);
My mask is not ok, because now it excludes all files.
Testing:
directoryInfo.ToList().ForEach(di => { Logger.Information(di.FullName); });
When running without the
|*/Reference/
Thank you.
Silviu