|
|
|
|
- Properties specific to zipArchive variables
- Functions that use zipArchive variables:
zipArchive (Type of variable) In french: zipArchive
The zipArchive type is used to handle an archive file corresponding to one of the following formats: ZIP, CAB, RAR, WDZ, 7z, TAR or TGZ (TAR.GZ). The characteristics of this file can be defined and changed using different WLanguage properties. Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable. New in version 28
// Create a backup archive for the "My Documents" directory MyArchive is zipArchive // Protect the archive by a password MyArchive.Password = "secret" // Create the archive zipCreate(MyArchive, "s:\Backups\" + DateToString(DateSys(), "YYYY-MM-DD") + ".zip") // Add the files zipAddDirectory(MyArchive, SysDir(srMyDocuments)) // Close the archive zipClose(MyArchive)
Remarks Properties specific to zipArchive variables The following properties can be used to handle a zipArchive variable: | | | Name | Type used | Effect |
---|
ArchiveFormat | Integer constant | Format of the archive file:- zipFormatCAB: File in CAB format
- zipFormatRAR: File in RAR format
- zipFormatWDZ: File in WDZ format
- zipFormatZIP: File in ZIP format
- zipFormat7Z: File in 7z format
- zipFormatTAR: File in TAR format
- zipFormatTARGZ: File in TGZ (TAR.GZ) format.
| CompressedSize | 8-byte integer | Total compressed size of the files found in the archive. This property is read-only. | CompressionLevel | Integer | Compression level that must be used to add files into the archive. For more details, see zipCompressionLevel. | File | Array of zipArchivedFile | Array of files found in the archive. | NbFile | Integer | Number of files found in the archive. This property is read-only. | NbPart | Integer | Number of parts in a multi-volume archive. For a single-volume archive, this property is equal to 1. This property is read-only.
| Password | Character string | Password that will be used to add files into the archive or to extract files from the archive. For more details, see zipPassword. This property is available in write mode.7z format: No password can be used. TAR and TGZ (TAR.GZ) format: No password can be used. | Size | 8-byte integer | Total size of the files in the archive (decompressed size). This property is read-only. |
Functions that use zipArchive variables: | | zipAddDirectory | Adds all the files found in a directory and in its subdirectories into an archive and compresses them. | zipAddFile | Adds a file (of any type) into an archive in CAB, ZIP, WDZ and 7z, TAR or TGZ (TAR.GZ) format and compresses it. | zipAddFileList | Adds a list of files (of any type) into an archive in ZIP, CAB, WDZ or 7z format and compresses it. | zipChangePath | Modifies the stored path of a file in an archive (in ZIP, WDZ or 7z format). | zipClose | Closes an archive. | zipCompressionLevel | Changes the compression level used when creating an archive in ZIP format or in 7z format. | zipCreate | Creates an archive. | zipCreateExe | Creates a self-extracting archive as a 32-bit executable (.EXE). | zipCurrentFile | Returns the name of the archived file currently handled by the functions for adding and extracting files. | zipDeleteAll | Deletes all files from an archive. | zipDeleteFile | Deletes a file from an archive. | zipDeleteFileList | Deletes a list of files from an archive. | zipExist | Used to find out whether an archive exists. | zipExtractAll | Extracts all files from an archive and decompresses them. | zipExtractFile | Extracts a file from an archive and automatically decompresses it to a physical location or in memory. | zipExtractFileList | Extracts and decompresses a list of files found in an archive to a physical location. | zipExtractPath | Returns the path of a file found in the archive. | zipFileSize | Returns the size of one of the files found in the archive (in CAB, RAR, WDZ, ZIP, 7z, TAR or TGZ (TAR.GZ) format):- the compressed size of the file.
- the size of file before compression.
| zipFindFile | Finds a file in an archive (in CAB, ZIP, RAR, WDZ or 7z format). | zipInfoFile | Returns the characteristics of a file found an archive:- The name of the file and its stored path.
- The initial size of the file.
- The compressed size of file.
- The date and time of file creation.
- The date and time of file modification.
- The date and time of file access.
- The file attributes.
- The file encryption mode.
| zipIsMulti | Returns the type of archive: single-part archive or multi-part archive. | zipListFile | Returns the list of files found in an archive. | zipMerge | Merges the different sub-archives found in a multi-part archive to create a single-part archive. | zipNbFile | Returns the number of files found in an archive (in CAB, RAR, ZIP, WDZ or 7z format). | zipNbPart | Returns the number of sub-archives (parts) found in an archive in CAB, RAR, ZIP, WDZ, 7z, TAR or TGZ (TAR.GZ) format. | zipNbPartNeeded | Returns the number of parts of a given size required to split a single-part archive. | zipOpen | Opens an existing archive. | zipOpenCAB | Opens an existing archive in CAB format. | zipOpenRAR | Opens an existing archive in RAR format. | zipPassword | Defines the password used to add files into the specified archive and to extract files from the specified archive (RAR, ZIP and WDZ format). | zipSize | Returns the size of archive (in ZIP, RAR, CAB, WDZ or 7z format):- the size of all compressed files found in the archive.
- the size of all files found in the archive before compression.
| zipSplit | Splits an archive into several sub-archives of a given size. |
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|