Skip to main content

Unpack files

Extracts selected files from the RAR archive by the list of paths

Function UnpackFiles(Val Archive, Val Paths, Val DestinationDirectory = "", Val Password = "") Export

ParameterCLI optionTypeRequiredDescription
Archive--srcString, BinaryDataPath to the archive on disk or binary data
Paths--pathsArray Of StringFull paths of files inside the archive
DestinationDirectory--destStringDirectory path for unpacking. To binary data if not filled
Password--passwordStringarchive password, if required
Returns

Map Of KeyAndValue - Information about the execution or description of selected files

tip

Parameters with Binary data type can also accept file paths on disk and URLs


1C:Enterprise/OneScript code example
ArchivePath = Parameters["RAR_ArchivePath"];
DestinateDirectory = Parameters["RAR_DestDir"];
Paths = Parameters["RAR_PartialPaths"];

Result = OPI_RAR.UnpackFiles(ArchivePath, Paths, DestinateDirectory);
oint rar UnpackFiles \
--src "/tmp/yt0geqvv.imf" \
--paths "['readme.txt','docs/note.txt']"
Result
{
"result": true
}