Can anybody please help me with the code to read file names inside a zip file using VB6. I am able to open(not extract) the zip file.

Can anybody please help me with the code to read file names inside a zip file using VB6. I am able to open(not extract) the zip file.

I am trying to do something a bit more difficult than just reading the file name from a zip file. I am trying to get a number off of a certain tab on an excel spread sheet. Which is located in a zip file on a mapped hard drive.. If I figure it out I'll let you know.

goto http://www.vbaccelerator.com

search zip

They have both the zip and unzip dlls with vb source code projects.

Good Luck

Thanks for the tip it is a start in the right direction just having problems registering the dll file. It seems like once I get past this hump it should be fairly easy to open in VB and get info from the needed cells.

If I remember correctly, you do not need to register the dlls but if you do the website I gave you should have the information you need.

Good Luck

Can anybody please help me with the code to read file names inside a zip file using VB6. I am able to open(not extract) the zip file.

I use this code to read information about files stored in zip

Dim oShellApp As New Shell32.Shell
Dim ZipFileName As String
ZipFileName = "c:\myfile.zip"
For Each oFile In oShellApp.NameSpace(ZipFileName).Items
    Debug.Print(oFile.Name)
    Debug.Print(oFile.Type)
    Debug.Print(oFile.ModifyDate)
    Debug.Print(oFile.IsFileSystem)
    Debug.Print(oFile.IsFolder)
    Debug.Print(oFile.Path)
    Debug.Print(oFile.Size)
Next

First I would like to thank everyone who has responded to me comment. Even though I didn't really ask a question the help has been very well informed and educated. I however thought I could run .tar.gz like a .zip file and the process for these would be practically the same. I have been researching the internet now for a few hours and realize this isn't the case. I apologize to those who tried to help me and I misinformed them of the proper situation. Now I do need help with the new problem I found 0 information on how to untar or unzip tar.gz files. I still think it should be similar to the .zip files but I can't seem to make it work in VB. I am going to post my problem explaining it in detail in a new thread. I once again thank the community of programmers who have reached out to help me and I hope to return the favor some day.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.