7zip command line - Exclude files HOW?

Started by
3 comments, last by owl 15 years ago
Hey! I'd like to be able to backup some folders with 7zip and I want certain files to be left out. I'm currently using the following command line
7zG.exe a game.7z lib game -mx=9 -x!*.o!*.a!*.def!*.exe!*.dll

but it doesn't exclude the files. It's obvious that I'm not doing it right, but I'm unable to find any example on how to do this properly. NOTE: oh, I posted this in the wrong forum.
[size="2"]I like the Walrus best.
Advertisement
Use -x multiple times, or at least that's what this linky says (under "Excluding Files"). Of course, I found this from [google] as the first result...
[size=2][ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]
It just doesn't work, look the command output:

C:\coding\work>7z.exe a test.7z ./test -x!*.o7-Zip 4.64  Copyright (c) 1999-2009 Igor Pavlov  2009-01-03ScanningCreating archive test.7zCompressing  test\game\data\texture\default.pngCompressing  test\Events\engine\cdevices.hCompressing  test\Events\engine\cdisplay.hCompressing  test\Events\engine\cevent.hCompressing  test\Events\engine\ckeyboard.hCompressing  test\Events\engine\cmouse.hCompressing  test\Events\engine\csystem.hCompressing  test\Events\engine\ctemplate.hCompressing  test\game\obj\engine\application.o <-- WTF!?!?!Break signaled
[size="2"]I like the Walrus best.
According to the third result from this google search, you need to specify "r" to make it exclude files recursively. Like so:

7z.exe a test.7z ./test -xr!*.o
alright. Thank you. I just used the wrong keywords for the search.

7zip
7zg.exe

do no return useful results.
[size="2"]I like the Walrus best.

This topic is closed to new replies.

Advertisement