Unpack files
Unpacks selected files from a 7z archive by a list of paths
- Parameters
- Advanced call ?
Function UnpackFiles(Val Archive, Val Paths, Val DestinationDirectory = "", Val Password = "") Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| Archive | --src | String, BinaryData | ✔ | Path to the archive on disk or binary data |
| Paths | --paths | Array Of String | ✔ | Full paths of files inside the archive |
| DestinationDirectory | --dest | String | ✖ | Directory path for unpacking. To binary data if not filled |
| Password | --password | String | ✖ | archive password, if required |
Returns
Map Of KeyAndValue - Information about the execution or description of selected files
| Parameter | Description |
|---|---|
| dontwait | Creates a background job and returns its data (for 1C and OneScript only) |
tip
Parameters with Binary data type can also accept file paths on disk and URLs
1C:Enterprise/OneScript code example
ArchivePath = Parameters["SevenZ_ArchivePath"];
DestinateDirectory = Parameters["SevenZ_DestDir"];
Paths = Parameters["SevenZ_PartialPaths"];
Result = OPI_7z.UnpackFiles(ArchivePath, Paths, DestinateDirectory);
- Bash
- CMD/Bat
oint 7z UnpackFiles \
--src "/tmp/uwhnw5sk.5mb" \
--paths "['readme.txt','docs/note.txt']"
oint 7z UnpackFiles ^
--src "/tmp/uwhnw5sk.5mb" ^
--paths "['readme.txt','docs/note.txt']"
Result
{
"result": true
}