# How to return zip files that include a .txt file which contains my search term?

I'm looking to run a search in FileLocatorPro that returns a list of zip files that include a .txt file that contains my search terms.

Here is an example file structure for my issue

• Z:\ZIP.zip\file1.zip\text.txt
-- text.txt contains "ABC"
• Z:\ZIP.zip\file2.zip\text.txt
-- text.txt contains "ABC"
• Z:\ZIP.zip\file3.zip\text.txt
-- text.txt contains "123"
• Z:\ZIP.zip\file4.zip\text.txt
-- text.txt contains "DEF"
• Z:\ZIP.zip\file5.zip\text.txt
-- text.txt contains "ABC"
• Z:\ZIP.zip\file6.zip\text.txt
-- text.txt contains "GHI"
• Z:\ZIP.zip\file7.zip\text.txt
-- text.txt contains "123"

When I search for "ABC", what I want is for the results to contain file1.zip, file2.zip and file5.zip because the text.txt files contain "ABC" and the text.txt files for the other zip files do not. Is there any way to do this in FileLocatorPro?

Thank you!

EDIT

Here are some screenshots of what I'm getting with the search terms and what I wish to get.

Results in File Locator Pro

Results in Windows search when "ABC" is searched on the unzipped file. This is what I would like File Locator Pro to output so I can simply copy the ZIP files I need.

I want to accomplish this task with File Locator Pro instead of the Windows Search because I have 259 ZIP files to search through that equal 160 GB unzipped. Within each zip file is approximately 2500 ZIP files and only about 5%-10% of those ZIP files is the data I need, and the only identifier is the index.text file containing the "ABC" text.

I would rather avoid using windows search to accomplish the task because unzipping all of the files (since Windows search can't search for zip files within zip files like File Locator Pro can) would be very time consuming. Ideally, I would like to run the search through File Locator Pro (with the understanding that it will also be time consuming but at least would be something that could run in the background), obtain the ZIP files I need, and move on with my life. :)

Thanks for the continued help!

asked Dec 24, 2014
edited Dec 29, 2014

+1 vote

Yes, that should be a fairly straight forward search in FileLocator Pro. Make sure you have switched on ZIP searching in the Compressed Files tab:

Then a simple search like:

File name:       *.txt
Containing Text: ABC
Look In:         Z:\ZIP.zip


If the text file must be called text.txt then use

File name:       text.txt


EDIT - question clarified

To list just the ZIP files go to the Reports tab and choose the File List report, style Tabulated - Text. Then click on the Report Options button and show ONLY the Location field:

Select the ZIP files you're interested in copying and press Ctrl+C. Then go back to your search and click the Multiple Folders button for the Look In field and paste the ZIP file list into edit box:

Finally clear out the the other criteria so you're left with something like:

File name:
Containing Text:
Look In:         Z:\ZIP.zip\file1.zip;Z:\ZIP.zip\file2.zip;Z:\ZIP.zip\file3.zip;Z:\ZIP.zip\file4.zip;Z:\ZIP.zip\file5.zip;Z:\ZIP.zip\file6.zip;Z:\ZIP.zip\file7.zip;Z:\ZIP.zip\file8.zip;Z:\ZIP.zip\file9.zip


Now when you search you'll have a list of the ZIP files you can copy.

answered Dec 24, 2014 by (53,670 points)
edited Dec 30, 2014 by dave
Thank you very much for your reply! This was helpful, but unfortunately I'm still having the issue of only having the text file returned in the zip returned, not the entire ZIP file.

I've edited the original post to include screenshots of what search results I'm getting and what I want the results to look like and why.
Ah, I see. FileLocator Pro can't copy the 'parent' zip, only the actual files that it finds. I'll add your request to the Issue Tracker. I've edited the answer to show a multi-step work-around.