Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

7zip command line - Exclude files HOW?

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
4 replies to this topic

#1 / owl   Banned   

376
Like
0Likes
Like

Posted 02 April 2009 - 05:44 PM

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.

#2 Cornstalks   Members   

7030
Like
0Likes
Like

Posted 02 April 2009 - 06:09 PM

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...
[ 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 ]

#3 / owl   Banned   

376
Like
0Likes
Like

Posted 02 April 2009 - 06:13 PM

It just doesn't work, look the command output:


C:\coding\work>7z.exe a test.7z ./test -x!*.o

7-Zip 4.64 Copyright © 1999-2009 Igor Pavlov 2009-01-03
Scanning

Creating archive test.7z

Compressing test\game\data\texture\default.png
Compressing test\Events\engine\cdevices.h
Compressing test\Events\engine\cdisplay.h
Compressing test\Events\engine\cevent.h
Compressing test\Events\engine\ckeyboard.h
Compressing test\Events\engine\cmouse.h
Compressing test\Events\engine\csystem.h
Compressing test\Events\engine\ctemplate.h
Compressing test\game\obj\engine\application.o <-- WTF!?!?!

Break signaled


#4 Codeka   Members   

1239
Like
0Likes
Like

Posted 02 April 2009 - 06:22 PM

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

#5 / owl   Banned   

376
Like
0Likes
Like

Posted 02 April 2009 - 06:28 PM

alright. Thank you. I just used the wrong keywords for the search.

7zip
7zg.exe

do no return useful results.




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.