Login  
Search All Forums
Dart Home | PowerTCP Zip Compression for Active | Custom Development Reply | PowerTCP Zip Compression for ActiveX Topics | Forums   
AuthorForum: PowerTCP Zip Compression for ActiveX
Topic: Validate a ZIP file without UnZipping
jridenour

From: Baltimore, MD USA
Posts: 2
Member Since: 06/03/04
posted June 3, 2004 1:30 PM

I have a situation where I'd like to open a zip file using your zip control to validate/test the zip file, without actually extracting the contents. Is this possible?
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted June 3, 2004 2:14 PM

No, it's not. In order to test the validity the file must be extracted then compared to the CRC that we saved. Sorry.
pvestuto

From: Kildeer, IL USA
Posts: 44
Member Since: 07/03/01
posted June 6, 2004 11:21 PM

Here;s something I do that seems to work pretty well for my application:

Set oZip = New DartZip.Zip
On Error Resume Next
oZip.QuickUnzip sFile, "???", True, sCompressPassword, False
Select Case Err.Number
  Case 0, zipWriteError
    ' 0           - no error (highly unlikely given the destination dir)
    ' zipWriteError 12026  - An unexpected error occurred while writing to the disk.
    '
    ' Success
    '
    DebugText DebugTBSQLAgent.GeneralDebug, "VerifyCompress - succeeded on compress check. " & Err.Description
    VerifyCompress = True
  Case zipImproperZipFile     ' 13001
    sMessageText = "The file is not identified as a compliant zip file."
  Case zipPasswordRequired    ' 13005
    sMessageText = "Unable to verify the compress aspect of the specified file. " & vbCrLf & vbCrLf & _
    "The Encryption property has a value other than zipNoEncryption and an operation was conducted without providing a password."
  Case Else
    sMessageText = "The file is not identified as a compliant zip file." & vbCrLf & vbCrLf & Err.Description
End Select
On Error GoTo errRoutine


norsoft_samm

From: mankato, MN USA
Posts: 2
Member Since: 03/07/01
posted November 15, 2004 5:23 PM

Just so people don't do the same thing I did, for pvestuto response, make sure you enter in the source destination instead of ??? as an invalid zip file will not be caught. 

(oZip.QuickUnzip sFile, "C:\", True, sCompressPassword, False) instead of 
(oZip.QuickUnzip sFile, "???", True, sCompressPassword, False)
Reply | PowerTCP Zip Compression for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX