file_password Property
This property specifies the case-sensitive password used to encrypt or decrypt the current file.
Syntax
def get_file_password(file_index: int) -> str: ... def set_file_password(file_index: int, value: str) -> None: ...
Default Value
""
Remarks
This property specifies the case-sensitive password used to encrypt or decrypt the current file. If set to an empty string, no password is used.
For archives that have multiple files with the same password, you may use the password property instead of the password property of the files collection. You may also use file_password_required property to see if a file requires a password after an archive has been scanned.
In this release, streaming out of encrypted archives is not supported. When compressing, WriteToProgressEvent must be set to false if Password is set.
Example (Compressing an Archive)
ZipControl.ArchiveFile = "c:\test.zip" ZipControl.RecurseSubdirectories = true ZipControl.IncludeFiles("c:\foo\*") ZipControl.Password = "nsoftware" ZipControl.Compress()
The file_index parameter specifies the index of the item in the array. The size of the array is controlled by the file_count property.