wildcard excluding recursively under specific path

Comments, questions, bug reports, etc.
Post Reply
chrislong2
Posts: 13
Joined: Sat Dec 16, 2023 10:39 pm

wildcard excluding recursively under specific path

Post by chrislong2 »

I must be super dense, but using wimlib-imagex, I do not understand how to do an exclude in [ExclusionList] to exclude say all *.txt files recursively under a certain directory (not ALL directories - I understand how to do that), like so:

\MyFolder\*.txt

Given that most everything else about wimlib's operation operates recursively on directories with no option in the matter, I don't understand why this does not - it only excludes the .txt files in that folder but not any subfolders. I've tried every iteration I know of including
\MyFolder\*\*.txt
\MyFolder\**\*.txt

no luck. This seems like it should be a super easy thing - what am I missing?
synchronicity
Site Admin
Posts: 474
Joined: Sun Aug 02, 2015 10:31 pm

Re: wildcard excluding recursively under specific path

Post by synchronicity »

There's no way to do this using standard path globs, which is what wimlib supports. (DISM behaves the same way, IIRC.) `*` doesn't match path separators. It would be necessary to add support for extended globs or regexes.
chrislong2
Posts: 13
Joined: Sat Dec 16, 2023 10:39 pm

Re: wildcard excluding recursively under specific path

Post by chrislong2 »

I appreciate the reply, even if the answer is disappointing. I can likely workaround by generating *.ext exclude lines for each subfolder - just a bit of a pain is all. Thanks for your work with wimlib.
Post Reply