I am trying to simply extract some .tar archives to their current directory using 7-Zip - excluding archives called 'dl.tar'. It should be straight forward - however the exclude flag is not working.

Here is the command;

7z x *.tar -x!dl.tar

The response;

J:\2016-Q4\Mapinfo\Europe\Albania>7z x *.tar -x!dl.tar

7-Zip [64] 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18

Processing archive: dl.tar

Is there something simple i am doing wrong?

  • 1
    Try using the -ax switch: Specifies archives to be excluded from the operation. - -ax!dl.tar – Aki Oct 11 '16 at 11:01
  • Ah that worked perfectly. Don't know how i missed that switch. Thanks! – Will Oct 11 '16 at 11:12
  • @Aki : It looks like you have an excellent opportunity for easy reputation points. Post that comment as an official answer, and it looks highly likely to be accepted. – TOOGAM Oct 11 '16 at 12:51

As previously mentioned in my comment, you can use the -ax switch.

7z x *.tar -ax!dl.tar

Specifies archives to be excluded from the operation.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.