?
Solved

Batch File: 7z.exe - DIR /s /b : Searching withing a ZIP file

Posted on 2010-08-17
5
Medium Priority
?
871 Views
Last Modified: 2013-12-01
Hi there,

In Windows Explorer, when a right-click on a foler an performs a search command, the search will also be done in ZIP files.

I need to do the same by using a command line.

I tried dir /s /b ".\All my zip files\*my needed document*.xls without success.

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
  • 2
  • 2
5 Comments
 
LVL 4

Accepted Solution

by:
BasiKobrA earned 668 total points
ID: 33454687
Hi again,

If I am not mistaken, windows kind of unzips the zip files on-the-fly to be able to show you which files are in there or to let you search in them, however you can not just manipulate it like a directory as-is.

What exaclty do you want to do after the search ? With 7z you could '7z l yourArchive.7z' and, combined with the 'find' command' search for the specific string.
0
 
LVL 10

Author Comment

by:ReneGe
ID: 33456734
Makes sense.

Also knowing that Windows kind of Unzips the file to perform a search with in it, I then expect that I faile search within ZIP files will take ages.

I could also create an Index file, linking buth the files it containes and the ZIP file itself.

Lets see what others have to say about this.

Cheers,
Rene
0
 
LVL 56

Assisted Solution

by:Bill Prew
Bill Prew earned 1332 total points
ID: 33460564
Not sure if I'm missing something, but using 7zip isn't this as simple as:


7z l file.zip "*my needed document*.xls"

or, if you need to search embedded folders in the zip:

7z l -r file.zip "*my needed document*.xls"

~bp
0
 
LVL 56

Assisted Solution

by:Bill Prew
Bill Prew earned 1332 total points
ID: 33460569
And if you want to search many ZIPS, then something like this:

7z l *.zip "*my needed document*.xls"

~bp
0
 
LVL 10

Author Closing Comment

by:ReneGe
ID: 33461189
Thanks guys,
Rene
0

Featured Post

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Question has a verified solution.

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

The article will include the best Data Recovery Tools along with their Features, Capabilities, and their Download Links. Hope you’ll enjoy it and will choose the one as required by you.
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
Six Sigma Control Plans
Progress

764 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