finding a PNG picture in a zip file.

I am looking for an example code of finding all ( template_thumbnail.png ) pictures in all zip,rar files in a Directory and all its sub Directorys.

I just need to browse to a Directory and look for (template_thumbnail.png) in all the rar/zip files in that directory and all its sub directorys.

Note: Some zip , rar files will have multiple zip/rar files in them that contain a (template_thumbnail.png).
LVL 12
Grant1842Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

vdh_techCommented:
Maybe you can use the integrated windows search functions, and an iFILTER (http://www.ifilter.org/)

Windows Search 4.0 might also be a consideration.  You're going to want to index the location and then search it.
0
Grant1842Author Commented:
well i am trying zipforge component. The code works just to point to 1 zip file and display its contents.
I need to point to a directory and find all the files and sub directorys(subfiles) that have the template_thumbnail.png in them.
Can someone help me with this code.
procedure TfmMain.bnStartClick(Sender: TObject);
var   ArchiveItem: TZFArchiveItem;
      ListItem: 	 TListItem;
      FileDate:    Integer;
begin
 ListView.Items.Clear;
 with Archiver do
    begin
          FileName := 'D:TEMPLETS\1.5.X\template.zip';
        // Open existing archive file
        OpenArchive(fmOpenRead);


        // Search text files stored inside the archive
        if (FindFirst('*.*',ArchiveItem,faAnyFile-faDirectory)) then
           repeat
    	      // Add file name
    	      ListItem := ListView.Items.Add;
    	      ListItem.Caption := ArchiveItem.FileName;

    	      // Add modification date
            FileDate := ArchiveItem.LastModFileDate shl 16 +
                        ArchiveItem.LastModFileTime;
    	      ListItem.SubItems.Add(DateToStr(
    	            FileDateToDateTime(FileDate)));

    	      // Add file size
    	      ListItem.SubItems.Add(IntToStr(ArchiveItem.UncompressedSize));

    	      // Add compression rate
    	      ListItem.SubItems.Add(Format('%f',[ArchiveItem.CompressionRate])+' %');

    	      // Add compressed file size
    	      ListItem.SubItems.Add(IntToStr(ArchiveItem.CompressedSize));

    	      // Add file path
    	      ListItem.SubItems.Add(ArchiveItem.StoredPath);
            until (not FindNext(ArchiveItem));

            // Close the archive
            CloseArchive;
    end;
end;

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Grant1842Author Commented:
Anyone have any thoughts here ?
THX
0
CodedKCommented:
Hi Grant1842,
ZipTV supports RAR files, and can search files in RAR/ZIP.

http://www.ziptv.com/
0
Grant1842Author Commented:
THanks for this i will look at it
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.