Full Version: Delete file in Zip
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
RedLineSkis
The following code unzips a zip file into a folder.
CODE
             ShellStr = PathWinZip & "Winzip32 -min -e" _
                     & " " & Chr(34) & FileNameZip & Chr(34) _
                     & " " & Chr(34) & FolderName & Chr(34)
            ShellAndWait ShellStr, vbHide


Does anyone know the correct syntax on how to delete a specific file within a zip file?
Thanks
khaos
If you can't find anything else just unzip the file then kill it from the folder you unzipped it to.
RedLineSkis
For those of you who are interested in doing something like this I found this .dll that allows you to manipulate zip files with VBA. Just download the light version, install it and register the .dll. There are instructions on how to utilize it within your VB code. All you really have to do is Reference the ActiveX controls in the Reference menu. It is really cool! It allows you to delete files, add files, etc. to a zip file without having to open it.

Polar ZIP
khaos
I just posted code to the archive here at ua that requires no reference and can build zips and unzip all files. It only requires WinXP. I have code working to unzip a single file that isn't in the mentioned post. Haven't tried deleting a file.

Ken
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.