Search within 7z, RAR, and zip files
Search within 7z, RAR, and zip files
Do you have a timeline for adding the ability to search within content within compressed files? Not just filenames but text within the compressed files.
At the moment I'm using DNgrep.
Thanks.
At the moment I'm using DNgrep.
Thanks.
Re: Search within 7z, RAR, and zip files
No, sorry.
It is on my TODO list.
It is on my TODO list.
-
- Posts: 697
- Joined: Wed Jan 05, 2022 9:29 pm
Re: Search within 7z, RAR, and zip files
Hi Void; you'll never guess why I am joining this thread :evilgrin:
I did a search for content zip* and could not find a post that discussed what I thought should be, by now, a feature of Everything. I have a collection of ZIPped files, A common practice for me is to create a ZIP file at milestones in a project.
I want to identify all files within the eight ZIP files are DOCuments of DOTemplates containing the string "paper".
I essayed with
Code: Select all
u: ext:zip content:paper
I reason that by now there must be a way to tell Version 1.5.0.1383a (x64) to examine the content of files within a zip file, without me having to unzip all the zip files (eight in U: but as many as 100 zip files in other projects) into a working folder just to do the content search.
I am thinking of some sort of "drill down" switch that would force examination of the files within a ZIP file, even to the matter of unzipping zip files stored inside a zip file.
If you or anyone can remember where this is discussed I'll be delighted to trot off and study how to do it.
Thanks, Chris
Re: Search within 7z, RAR, and zip files
You have to search in Container:
From the help web pages
container-file-name:
container-file-names:
rar-file-name:
rar-file-names:
zip-file-name:
zip-file-names:
7z-file-name:
7z-file-names:
Search container files for the specified semicolon (;) delimited list of filenames.
Examples:
container-file-name:Everything.exe
container-file-name:Everything.exe;Everything.chm
regex:container-file-name:^Everything
From the help web pages
container-file-name:
container-file-names:
rar-file-name:
rar-file-names:
zip-file-name:
zip-file-names:
7z-file-name:
7z-file-names:
Search container files for the specified semicolon (;) delimited list of filenames.
Examples:
container-file-name:Everything.exe
container-file-name:Everything.exe;Everything.chm
regex:container-file-name:^Everything
Re: Search within 7z, RAR, and zip files
I think the question was not so much to find files within Container files by filename, but more by type eg. DOC or DOT AND within them contain the string "paper"
Can Everything "content search" files within Container files?
Can Everything "content search" files within Container files?
-
- Posts: 697
- Joined: Wed Jan 05, 2022 9:29 pm
Re: Search within 7z, RAR, and zip files
Correct! And thank you for clarifying my issue.
This is part of what I suspect is a larger challenge.
For example, using "container" in a general sense, I consider a MSWord (or MSExcel etc.) template to hold a Project which itself holds a set of Modules which themselves hold Strings of characters.
We humans make those strings visible by using Alt+F11 to open the code for editing,which Everything would need to know to do.
But there must be many, many types of"containers" besides ZIP files and VBA projects.
Zip files wh9ich contain other ZIP files is one example.
Thanks again, Chris
Re: Search within 7z, RAR, and zip files
To search compressed files containing a 'document' file:
doc: will expand to your document filter search. eg: ext:doc;docx;txt;html;pdf;etc...
Everything doesn't have support to search content inside zip files. yet..
containerfilename:doc:
doc: will expand to your document filter search. eg: ext:doc;docx;txt;html;pdf;etc...
Everything doesn't have support to search content inside zip files. yet..
Re: Search within 7z, RAR, and zip files
That gives a list of containerfiles .eg zip files but what do we add to get the name of the "doc:" filenames found?
Re: Search within 7z, RAR, and zip files
Code: Select all
*.zip multistring:regex:containerfilename:(.*\.(asm|c|cc|chm|cpp|cs|css|csv|cxx|doc|docm|docx|dot|dotm|dotx|efu|epub|h|hpp|htm|html|hxx|ini|java|js|json|lua|md|mht|mhtml|mobi|odp|ods|odt|pdf|php|pl|potm|potx|ppam|pps|ppsm|ppsx|ppt|pptm|pptx|ps1xml|pssc|pub|py|rtf|sldm|sldx|sql|tsv|txt|vb|vsd|wpd|wps|wri|xlam|xls|xlsb|xlsm|xlsx|xltm|xltx|xml|xsl))$ add-column:1
multistring:
Re: Search within 7z, RAR, and zip files
This as you say this gives first match? but if you want to list all the files with the extensions eg.all the .doc files, one per line, in the zip files, how do we do that?
*.zip regex:containerfilename:(.*\.doc)$ add-column:1 gives only one .doc file per zip file
*.zip regex:containerfilename:(.*\.doc)$ add-column:1 gives only one .doc file per zip file
Re: Search within 7z, RAR, and zip files
Everything is not really designed to list all occurrences of the regex pattern.
All occurrences are highlighted if you show the container filename column.
Include the following in your search:
To show the first 9 matches:
global:
Unfortunately, global: doesn't work with multi-value strings.
All occurrences are highlighted if you show the container filename column.
Include the following in your search:
add-column:container-filename
To show the first 9 matches:
Code: Select all
*.zip add-column:regmatches global:nomultistring:regex:containerfilenames:(?:^|;)([^;]*\.(?:asm|c|cc|chm|cpp|cs|css|csv|cxx|doc|docm|docx|dot|dotm|dotx|efu|epub|h|hpp|htm|html|hxx|ini|java|js|json|lua|md|mht|mhtml|mobi|odp|ods|odt|pdf|php|pl|potm|potx|ppam|pps|ppsm|ppsx|ppt|pptm|pptx|ps1xml|pssc|pub|py|rtf|sldm|sldx|sql|tsv|txt|vb|vsd|wpd|wps|wri|xlam|xls|xlsb|xlsm|xlsx|xltm|xltx|xml|xsl))(?=;|$)
Unfortunately, global: doesn't work with multi-value strings.
-
- Posts: 697
- Joined: Wed Jan 05, 2022 9:29 pm