Howdy all, Hope everyone is having a great Easter long weekend.
I've got the following code to list a zip file's contents. It use Craig Boyd's wonderful vfpcompression.fll I thought the following code would be fine to just list files in a zip: * from http://www.sweetpotatosoftware.com/SPSBlog/PermaLink,guid,07ed8874-8781-4e76-878b-92b3f4cfc8b3.aspx RELEASE ALL lcFileZip = [FilesDownloaded.zip] CREATE CURSOR curFilesDownloaded ( FileName c( 50)) SET LIBRARY TO [vfpcompression.fll] IF UnZipOpen( lcFileZip) lnFiles = UnZipFileCount() FOR lnLoop = 1 TO lnFiles = UnzipAFileInfoByIndex( [laTemp], lnLoop) INSERT INTO curFilesDownloaded ( FileName) VALUES ( laTemp[ 1]) lnRecCount = RECCOUNT( [curFilesDownloaded]) IF lnRecCount % 100 = 0 WAIT TRANSFORM( lnRecCount) + [ ...] WINDOW NOWAIT ENDIF ENDFOR UnZipClose() ENDIF All works okay - eventually. The process gets slower as files are read in the zip, which suggests that it's reading from the start of the zip file each time. Seems very inefficent, especially as I'm testing zips with 1,000+ files each. Any suggestions? Cheers, Garry PS: I was hoping to use vfpcompression.fll as a replacement to the following: lcFileZip = [FilesDownloaded.zip] CREATE CURSOR curFilesDownloaded ( FileName c( 50)) o = CREATEOBJECT( [shell.application]) lnRecCount = 0 FOR EACH oFile IN o.NameSpace( lcFileZip).items INSERT INTO curFilesDownloaded ( FileName) VALUES ( oFile.Name) lnRecCount = RECCOUNT( [curFilesDownloaded]) IF lnRecCount % 100 = 0 WAIT TRANSFORM( lnRecCount) + [ ...] WINDOW NOWAIT ENDIF ENDFOR o = Null This line is a deal-breaker: FOR EACH oFile IN o.NameSpace( lcFileZip).items It reads all the filenames (too long when 1000 files+ are in the zip) before FOR EACH oFile begins. --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/capuo4g5gu6rsnrdn_ptyrgq9yhlexrucqb3ho3ehf_rx_8n...@mail.gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

