Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Batch File: 7x.exe : How to use an exclude filename

Posted on 2010-08-17
7
Medium Priority
?
1,008 Views
Last Modified: 2013-12-01
Hi there,

How do I add the option of excluting files, by using a text file that will contain the exclusion parameters.  (-x...) (exclude.ini contains: *.mp3, *.wav, *.avi).

"C:\Program Files\7-Zip\7z.exe" -p1234 a -r -mx=9 "Z:\Documents.zip" "C:\Documents\*.*"

Thanks,
Rene
0
Comment
Question by:ReneGe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 7

Expert Comment

by:marektech
ID: 33454565
I don't think you can get it to read a .ini file for excluded file types.

You have to specify them in the command, e.g: -x!*.pdf -x!*.doc
0
 
LVL 10

Author Comment

by:ReneGe
ID: 33454589
Marektech,

Thanks for helping.

Here is the description of what is required for the command line.

  -x[r[-|0]]]{@listfile|!wildcard}: eXclude filenames

How would i use "-x" to do what I need?

Thanks,
Rene
0
 
LVL 4

Accepted Solution

by:
BasiKobrA earned 2000 total points
ID: 33454603
Create exclude.ini with each line another exclusion string, for example
*.mp3
*.wav
test*
*.ini

"C:\Program Files\7-Zip\7z.exe" -p1234 a -r -mx=9 "Z:\Documents.zip" "C:\Documents\*.*" -xr@exclude.ini
0
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

 
LVL 10

Author Comment

by:ReneGe
ID: 33454609
Thanks BasiKobrA

Cheers,
Rene
0
 
LVL 10

Author Comment

by:ReneGe
ID: 33454640
==>marektech

Oups, sorry... I was to quick in awarding points and miss-clicked your check-box.

I'll give you more points next time to compensate.

Cheers,
Rene
0
 
LVL 7

Expert Comment

by:marektech
ID: 33454664
Have you tried:

-x!*.mp3 -x!*.wav -x!*.avi
0
 
LVL 7

Expert Comment

by:marektech
ID: 33454669
No problem :) Glad you found a solution
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a fine trick which I've found useful many times, when you just don't want to accidentally run a batch script or the commands needs administrator rights.
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Six Sigma Control Plans

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question