ISZipHelper.GetFilesList

Description

This function returns the list of the archive files extracted into the selected destination folder.

Syntax

object.GetFilesList()

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

Return Value

ISStrings

Returns the list of the archive files extracted into the selected destination folder.

Example

Display the list of the archive files extracted into the selected destination folder.

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:

Version information

Added in v7.8.0