Archive directory
Packs files from the specified directory into an archive
- Parameters
- Advanced call ?
Function ArchiveDirectory(Val Directory, Val ArchivePath = "", Val Settings = Undefined) Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| Directory | --src | String, BinaryData | ✔ | Path to the directory or data description for packing |
| ArchivePath | --dest | String | ✖ | Path to save the archive. To binary data if not filled |
| Settings | --settings | Map Of KeyAndValue | ✖ | Additional settings. See GetArchivingSettingsStructure |
Returns
BinaryData, Map Of KeyAndValue - Execution information or binary archive data
| 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
SourceDirectory = Parameters["SevenZ_SourceDir"];
ArchivePath = Parameters["SevenZ_ArchivePath"];
Result = OPI_7z.ArchiveDirectory(SourceDirectory, ArchivePath);
- Bash
- CMD/Bat
# JSON data can also be passed as a path to a .json file
oint 7z ArchiveDirectory \
--src "/tmp//opi_sevenz_63920079973933/src_compress" \
--dest "/tmp//opi_sevenz_63920079973933/archive_lzma.7z" \
--settings "{'password':'***','method':'Lzma2','level':'9','solid':true,'encrypt_header':'','threads':'','chunk_size':'','dictionary_size':'','ppmd_order':'','ppmd_memory':'','filters':'','delta_distance':''}"
:: JSON data can also be passed as a path to a .json file
oint 7z ArchiveDirectory ^
--src "/tmp//opi_sevenz_63920079973933/src_compress" ^
--dest "/tmp//opi_sevenz_63920079973933/archive_lzma.7z" ^
--settings "{'password':'***','method':'Lzma2','level':'9','solid':true,'encrypt_header':'','threads':'','chunk_size':'','dictionary_size':'','ppmd_order':'','ppmd_memory':'','filters':'','delta_distance':''}"
Result
{
"result": true
}