IPWorks ZIP 2020 JavaScript Edition

Questions / Feedback?

Scan Method

Scans the compressed archive.


async sevenzip.scan(): Promise<void>


This method will scan the archive specified by ArchiveFile. The number of files and their names and sizes will be determined and written to the Files collection.

After scanning the archive, the values of FilesDecompressedName may be changed if desired, and any number of files may be decompressed. The Extract method allows you to decompress files of your choice, and the ExtractAll method will decompress the entire archive.

Changing the values of the FilesCompressedName field or the number of files in the Files collection will invalidate the scan. If either of these is changed and Extract or ExtractAll is then called; Scan will automatically be called again, and these values will be reset to their original values.

Calling this method will frequently generate a trappable error if the archive is corrupt. This is not guaranteed, however, as Scan only examines the headers.


Dim i As Integer
ZipControl.ArchiveFile = "c:\temp.zip"
For i = 0 To ZipControl.FileCount - 1
    Debug.Print "File Name: " & ZipControl.FileDecompressedName(i)
    Debug.Print "File Size: " & ZipControl.FileDecompressedSize(i)
Next i

Copyright (c) 2021 /n software inc. - All rights reserved.
IPWorks ZIP 2020 JavaScript Edition - Version 20.0 [Build 7720]