IPWorks ZIP 2020 Python Edition

Questions / Feedback?

scan Method

Scans the compressed archive.


def scan() -> None: ...


This method will scan the archive specified by archive_file. 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 file_decompressed_name 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 extract_all method will decompress the entire archive.

Changing the values of the file_compressed_name field or the number of files in the files collection will invalidate the scan. If either of these is changed and extract or extract_all 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) 2022 /n software inc. - All rights reserved.
IPWorks ZIP 2020 Python Edition - Version 20.0 [Build 8300]