I want to add any txt file under a given path using 7-Zip.
Looking at the help I tried this:
7za a -ir!*.txt bla.7z c:\initial\path
This ended up including every single file, txt or not.
Looking at this question I tried to do this:
7za a -ir!.\*.txt bla.7z c:\initial\path
This ended up giving me this awkward message:
Error:
Duplicate filename:
c:\initial\path\CLI\0003\readme.txt
c:\initial\path\CLI\0003\readme.txt
Interestingly the -xr option works fine for me. For example if I try:
7za a -xr!*.txt bla.7z c:\initial\path
every file but the txts are included.