Filter multiple types of files
desolate-planet opened this issue · 2 comments
Hello,
I'm started to use this API to clear some SMB shares and I've tried the following API call:
for (FileIdBothDirectoryInformation f : share.list(targetFolder, "*.pdf"))
This works fine, but if I do the following: for (FileIdBothDirectoryInformation f : share.list(targetFolder, "*.pdf, *.xml")) , it doesn't work. I can't find any documentation on valid search patterns of even any examples. Can someone confirm what the correct pattern should be.
Also, is this the correct API call for files only, as I simply want to grab file details from a directory, check the age date and if the date has exceeded, I want to delete it. This API call is also providing directory info in it's results when it's purely files I'm after.
Thanks
Hi!
This is where you can find the reference to how this is implemented: MS-SMB2 2.2.33
- As you can see, all possible
FileInformationClass
options, talk about files and directories in a directory, so indeed, you will always get both - The specifics for the wildcard are actually specified in MS-FSCC 2.2.1.1.3
Did this answer your question?