🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #6724

Re: exploring zipped folders

#6724
From: Mark Jacobs
Date: Mon, 18 Apr 2005 14:26
33 lines
2140 bytes
Job wrote:
> Got problems searching in Microsofts Library, so maybe you can help. What 
> methods should I use to programmatically retrieve the file names and data 
> for files in zipped folders (.zip files), also letting me pass the files to 
> ShellExecute().?

Use a freeby 3rd party component like the one I use from
http://www.componentace.com/zip_component_zip_delphi_zipforge.htm

Example code to add up all the file sizes inside a .ZIP file using the 
ComponentAce ZipForge VCL component :-

   __int64 tsz=0,ii=0; bool ok; TZFArchiveItem arit;
   ZipForge1->FileName="MYZIP.ZIP";
   ZipForge1->OpenArchive(fmOpenRead);
   ZipForge1->Options->Recurse=true;
   try
   {
     ok=ZipForge1->FindFirst("*.*",arit,255-faDirectory,"");
     while (ok) { ++ii; tsz+=(__int64)arit.UncompressedSize; 
ok=ZipForge1->FindNext(arit);}
     ShowMessage(nam+" with "+AnsiString(ii)+" Files Totalling "+mjfmtnm(tsz));
   }
   catch (Exception &excp)
   {
     ShowMessage(excp.Message);
   }
   ZipForge1->CloseArchive(); ZipForge1->Options->Recurse=false;

HTH
-- 
Mark Jacobs
http://www.dkcomputing.co.uk
Technical Details
Message-ID: <4263c35a@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news3.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <42636a38@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,87fb4c674e92a9bf
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Mon, 18 Apr 2005 15:26:12 +0100
From: Mark Jacobs <http://www.jacobsm.com/mjmsg.htm?mj@critical>
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: exploring zipped folders
References: <42636a38@newsgroups.borland.com>
In-Reply-To: <42636a38@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 81.144.157.8
Message-ID: <4263c35a@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1113834330 81.144.157.8 (18 Apr 2005 07:25:30 -0800)
Lines: 33
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news3.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail