How do I do a search in File Explorer that includes subfolders of zip archives?
There are a few things that you will need to keep in mind.
First of all, you will want to ensure that the your zip files are indexed properly:
- Press + S
- Type Indexing Options and press Enter
- In the subsequent window click on the Advanced button (and acknowledge UAC, as necessary)
- Select the File Types tab
- Scroll down and select the Zip file extension
Ensure that zip files are configured to Index Properties and File Contents, as seen below:
(Source)
Next, within the File Explorer interface you will want to select the Search field and confirm that the Search Tools tab is configured within the Location section to search inside All subfolders, as seen below:
Finally, within the File Explorer interface you will want to select the Search field and confirm that the Search Tools tab is configured within the Options section and modify the Advanced options to search inside Zipped (compressed) folders in non-indexed locations, as seen below:
Related videos on Youtube
Kyle Delaney
Updated on September 18, 2022Comments
-
Kyle Delaney over 1 year
In File Explorer, I can enter search terms in the upper-right search box to search the current folder and all subfolders. I can also navigate the folder tree of zip archives like any other folders. However, if I want my searches to include files in a zip archive I have to navigate to the specific folder in the zip archive where the file is located. My searches never include files in zip archives if I'm not in the archive, and when I am in the archive my searches don't include files within the archive's subfolders.
Is there a way for my searches to include zip archive subfolders?
-
Kyle Delaney over 6 yearsIt looks like I already tried this. And I tested it by searching for something I know is in the zip archive. It returns results if I'm inside the archive in the correct subfolder, but not if I'm searching from a parent folder of the archive.
-
Run5k over 6 yearsThat is very unusual. At this point, I would revert back to "troubleshooting 101" and ascertain all of the facts to see if there are any extenuating circumstances that may cause the problem to persist: are these actually zip files, not 7z or rar files? Is the location where that file resides indexed? If so, was the file placed in that location long enough to be indexed properly? Also, is the file actually password protected?
-
Kyle Delaney over 6 yearsIt's a good guess that 7-zip and password-protection could be at fault, but I experimented with ordinary Windows-10-generated zip archives and experienced the same behavior. Have you experimented with this lately? Try putting text.txt in a folder and then zip that folder and then do a search for "test."
-
Run5k over 6 yearsFirst of all, please note that 7z files and rar files are not configured to Index Properties and File Contents by default, but zip files are already configured in that manner. That being said, yes, I tested this rather extensively earlier today. For example, my Windows 10 machine has a folder called
C:\Users\Public\Downloads\Software
and within File Explorer I searched forPsList
. Since thePublic
user folder is indexed by default, my search immediately found the executable file inside thePSTools
zip file within thePsTools 2.44
subfolder underneathSoftware.
-
Run5k over 6 yearsFrom my perspective, the most critical piece of the puzzle is to utilize the search index to search inside all subfolders. I have tested this with Zip files on five different Windows 10 computers over the last few days, and it works quite well on all of them. However, if you are using either 7z or Rar files (especially with password protection), your mileage may vary. At the very least, you would need to manually configure those two file extensions to Index Properties and File Contents on your computer. And with any new file, please remember that indexing can take a while.
-
Kyle Delaney over 6 yearsI suppose I should guess then that the search isn't working because the zip archives haven't been indexed. Could it be that the indexing process isn't being triggered automatically?
-
Run5k over 6 yearsPossibly so... you could always manually initiate a rebuild of the search index to see if that helps. Once again, please keep in mind that in can take a little while for a newly created file to become indexed, depending upon the speed of your system, how many files/folders reside on the system, etc. The PsList executable file I mentioned earlier was definitely indexed already. Of course, we also need to ensure that the file exists in a location that is being automatically indexed by Windows 10.
-
Kyle Delaney over 6 yearsOkay, I think I see what's going on here. The search will find the file within the zip archive but not as a file but rather a piece of file content since it's treating the zip archive as one file. So when I do a search from outside the zip archive, the search will return the zip file itself and won't return as a result the actual file I'm looking for within the zip archive. Then when I have the zip archive open in File Explorer, the search won't work the way it normally does. It only searches whatever specific folder within the archive I have open, and not subfolders.
-
Run5k over 6 yearsYes, that is essentially the search function working as advertised. In the example I mentioned previously, the
PsList
search was found in a few different places within myC:\Users\Public\Downloads\Software
folder. However, the search results displayed thePSTools
zip file as well as the name of two PDF files that actually referenced PsList within the text of the document. In other words, when we are searching for something that is buried within another file from a parent folder, the results display will simply show us which file it is in. -
Run5k over 6 yearsIt has been several days since we heard from you. Did you have any lingering questions?
-
Kyle Delaney over 6 yearsWell I still can't really do what I'm trying to do, so fundamentally my question hasn't been answered.
-
Run5k over 6 yearsUnfortunately, that is symptomatic of the way that Windows inherently works. Anything that resides inside a Zip file will be treated in the same manner as text contents are within a document. The search results will show the "parent file."
-
Ryan about 5 yearsUnfortunately these steps did not help my Windows search find files within a zip file searching by their file name.