ISProfile.CreateZipHelper

Description

This function creates the zip helper.

Syntax

object.CreateZipHelper()

Part Attribute Type Description
object Required
The object always implements the ISProfile interface

Return Value

ISZipHelper

Returns the zip helper.

Example

Display GetFilesList for the zip helper.

Dim aDialogue
Dim aSelectArchive
Dim aZipHelper
Dim aOpenArchive
Dim aSelectFolder
Dim aPath
Dim aMessage
Dim aFiles, aFile
Dim aExtracted

Set aDialogue = Profile.CreateOpenDialog
aDialogue.Title = "Select Archive"
aDialogue.Filter = "*.zip||*.*||"
aDialogue.FileName = "*.zip"

aSelectArchive = aDialogue.Execute
if not aSelectArchive then
  Profile.MsgBox("No archive file is selected")
  exit sub
end if  
   
Set aZipHelper = Profile.CreateZipHelper
aOpenArchive = aZipHelper.OpenArchive(aDialogue.FileName, "")
 
if not aOpenArchive then
  Profile.MsgBox("The selected archive cannot be opened")
  exit sub
end if  
 
set aDialogue = Profile.CreateExtShellBrowser
aDialogue.Caption = "Select folder to extract"
aDialogue.Prompt = "Select a folder"
aDialogue.RootPath = "D:" 
aDialogue.InitialPath = "D:\"
aSelectFolder = aDialogue.Execute

if not aSelectFolder then
  Profile.MsgBox("No folder is selected")
  exit sub
end if  

aPath = aDialogue.PathName

aMessage = ""

set aFiles = aZipHelper.GetFilesList
for i = 0 to aFiles.Count - 1
  aFile = aFiles.Item(i) 
  aExtracted = aZipHelper.ExtractFile(aFile, aPath)
  if aExtracted then
    aMessage = aMessage & vbNewLine & aFile & " - successfully"
  else
    aMessage = aMessage & vbNewLine & aFile & " - error: " & aZipHelper.LastZipError      
  end if
next
 
Profile.MsgBox(aMessage)
Note:

In Profile Client v8 on User Interface Zip Helper cannot be found.

Version information

Added in v7.8.0