Progress indicator for large unzip

Anyone have a recommendation on how to display progress unzipping a file or at least a way of knowing when it’s complete? The inbuilt folderitem.zip works well but is silent. Running under Windows.

It’s not possible at the moment. You should be adding a feature request.

1 Like

Will do. Thanks Martin.

If you have plugins you can calculate your progress by getting the total file count and then incrementing progress for each one unzipped.

EinhugurZipArchives.ZipArchive.EntryCount
ArchiverMBS.FileCount

1 Like

It would be great to have this progress in Folderitem.CopyTo method too.

You could ask Windows to do that for you

Public Function UnzipWithOS(zipArchive As FolderItem, destination As FolderItem) As Boolean
  Var isSuccessful As Boolean
  
  if zipArchive <> nil AND zipArchive.Exists AND destination <> nil AND destination.Exists then
    
    #IF TargetWin32
      var sourceParams( 1 ) as variant
      sourceParams( 1 ) = zipArchive.NativePath
      
      var unzipParams( 1 ) as variant
      unzipParams( 1 ) = destination.NativePath
      
      var copyHereOpts as integer
      
      var shellApp as new OLEObject( "Shell.Application" )
      var sourceObj as OLEObject = shellApp.Invoke( "NameSpace", sourceParams )
      var unzipObj as OLEObject  = shellApp.Invoke( "NameSpace", unzipParams )
      unzipObj.CopyHere( sourceObj.Items, copyHereOpts )
      
      isSuccessful = destination.Exists
    #ENDIF
    
  end if
  
  RETURN isSuccessful
End Function

1 Like

I have been using the Chilkat plugin for this. In the Zip class there’s an ExtractAsync method that allows you to query the Task for progress information with a timer. It does require the paid version, so not for everyone. I believe MBS has a zip extraction class too.

Of course you could always shell to 7zip, peazip, info-zip or some other public domain extractor and read the progress from the shell.

1 Like