by Admin » Sun Jan 11, 2026 9:01 am
Hi, since the mask can now be used to filter folder inclusion based on the folder name, yes I think a new option Folders Containing could be needed, or maybe even better a new syntax for the mask, with containing: at the start, e.g. containing:.mp3 *.jpg means folder containing and then the mask applied to the files within the folder. You should be able to use the Condition in Filters (12) to achieve the same:
object('isdir') && (countFilesInFolder('*.mp3') > 0 || countFilesInFolder('*.jpg') > 0)
Notes:
- countFilesInFolder, when applied to a folder, counts files inside that folder (use patterns like "*.mp3", "*.jpg").
- If you want to include subfolders in the count, call countFilesInFolder("*.mp3", true) (second parameter = includeHidden; includeSystem is third). There is no built-in recursive flag for countFilesInFolder, so to inspect nested folders you would need a different approach (e.g., listFilesInFolder and custom checking in JS).
- Ensure Filters (12) has "Folders" checked; otherwise folders won’t be shown/selected.