Question Searching inside a 7-Zip folder for a particular word in a filename ?

pjfarr

Distinguished
Jul 23, 2015
7
0
18,510
Is it possible to search a 7-Zip folder (foldername.7z) for a particular word in a filename?

For instance, I have a 7z folder full of clipart images in different formats (PNG, JPG, BMP, etc.) There are filenames such as "Fence-with-cat-sitting-on-it.jpg", "windowsill_with_cat_looking_out.png", "DogCuddlingWithCat.bmp", and so on, each with different file type extensions. I'd like to search for every image type with the word "cat" in the name. Since "cat" is not at the beginning of some filenames I can't do it by merely sorting files alphabetically (I archive the files, retaining their original names when downloaded.)

Can this be done, preferably without installing anything extra?

Thanks!
 
Yes - it can be done.

You are/will be working with strings and parsing.

Most likely you will need to install some coding apps that could be used. Python perhaps. That would likely be "something extra".

Powershell (Microsoft, free) may or may not already be installed on your system.

= = = =

However, the problem seems to very much be a homework type problem and Forum rules prohibit assistance with homework assignments.

May not be homework but there is no way to truly know from this end.

What you can do is show your work and what you have tried thus far.

Provide error messages etc. that appear when the search process fails. Note what you believe may be the error and then request comments and suggestions.
 
Can this be done, preferably without installing anything extra?
Yes, but that is somehow dependent of your acual meaning by "something extra" and what OS or software you already have.

If this is homework, then the strategy will be something like this:
  • Parse all files, and do a check each file name extension.
  • Parse the list of files within the 7z archive.
  • Do whatever check to filter by name, size, etc. Just remember to include path (othervise the search result would be meaningless).