When I do
7z a test.zip -x!*discarded* test
with
test/
test/a.txt
test/subfolder/
test/subfolder/a.txt
test/subfolder/discarded/
test/subfolder/discarded/a.txt
test/subfolder2/a.txt
test/subfolder2/subfolder3/a.txt
test/subfolder2/subfolder3/discarded/
test/subfolder2/subfolder3/discarded/a.txt
then, unfortunately, everything is still included!
How to exclude every file/folder like */discarded/*? (or, alternatively, exclude any file/folder whose absolute path contains discarded?)
Also, how to exclude all files ending by .txt? (-x!*.txt doesn't work)
I use 7z on Windows.
Note: 7Zip - Command Line : Exclude folder(s) by wildcard pattern? didn't help here.