- Error codes
- Extracted file
- Extraction and password
- Stored path
- Extraction from a multi-part archive on diskettes
zipExtractFileList (Function) In french: zipExtraitListeFichier
Not available
Extracts and decompresses a list of files found in an archive to a physical location.
Syntax
<Result> = zipExtractFileList(<Archive> , <List of paths> [, <Destination> [, <Options> [, <WLanguage procedure> [, <Progress>]]]])
<Result>: Integer - 0 if the files have been extracted,
- An error code (value greater than 0) otherwise. For more details on these error codes, see the Remarks.
<Archive>: Character string or zipArchive variable Name of the archive to be used. This name can correspond to: <List of paths>: Character string List of stored paths of files that will be extracted from the archive. The different paths are separated by CR characters (Carriage Return). Performs an exact-match search on each path of files found in the archive. <Destination>: Optional character string or constant Destination path of extracted files:- Optional character string: The files are extracted into the specified path to which is added the tree structure of the file (the disk is not stored). The specified path is created if it does not exist.
The destination path of the extracted file must correspond to the working directory of the application (returned by fDataDir) or one of its subdirectories. - Optional constant:
| | zipDirectory (Default value) | Extraction into the current directory without restoring the tree structure of the files (if it was stored). | zipDrive | Extraction:- to the initial location of the files if it was stored and if the drive exists.
- while restoring the tree structure of the files on the current drive if the drive or the stored directory does not exist.
- in the current directory if only the name and extension of the files have been stored.
   This constant is not available. The directories have no root.
  This constant and zipDirectory will have the same effect. Archives in 7z format: This constant and zipDirectory will have the same effect. | zipNone | Extraction into the current directory without restoring the tree structure of the files (if it was stored). |
<Options>: Optional Integer constant Configure the extraction (if <Destinations> corresponds to a character string):
| | zipOverwrite | During the extraction, the existing read-only files are automatically overwritten by the extracted files.
|
<WLanguage procedure>: Optional procedure name Name of the WLanguage procedure that will be called if an error occurs when extracting files. This procedure has the following format:
PROCEDURE ProcedureName (<Error Code>, <File Name>)
where: - <Error code> is an integer corresponding to the code of the error that occurred when extracting the file.
- <File name> is a character string that contains the path of the file processed by zipExtractFileList.
The procedure can return one of the following constants: | | zipCancel | Cancels the extraction of files from the archive. | zipIgnore | Ignores the file in error. | zipRetry | Retries the file extraction. |
<Progress>: Control name or procedure name Progress bar management mode. This parameter can correspond to: If you are using an archive: - in TAR or TGZ (TAR.GZ) format, the progress bar is refreshed at the end of the extraction of each file.
- in CAB and RAR format, the progress bar is refreshed at the end of the extraction of each file.
- in 7z format, only <Overall progress percentage> is specified. <File progress percentage> will have the same value.
Remarks Extracted file The extracted files are not deleted from the archive. To delete one file or all the files from the archive, use zipDeleteFile or zipDeleteAll. Stored path The table below presents the paths stored in the archive according to: - the access path to the file,
- the stored path section.
The current directory is: "C:\Temp". | | | | | zipAddFile | File location | zipNone | zipDirectory | zipDrive | zipAddFile("Archi", "File.txt") | C:\Temp\File.txt | File.txt | File.txt | File.txt | zipAddFile("Archi", "Data\File.txt") | C:\Temp\Data\File.txt | File.txt | Data\File.txt | Data\File.txt | zipAddFile("Archi", "D:\Data\File.txt") | D:\Data\File.txt | File.txt | Data\File.txt | D:\Data\File.txt | Remark: If the zipDrive constant is used: - the WDZ format stores the full path of the file (including the drive letter).
- the ZIP format does not store the drive letter.
- the 7z format stores the directories only.
Business / UI classification: Business Logic
This page is also available for…
|
|
|
|