Skip to main content

Get list of files

Gets a hierarchical list of files and directories in the archive

Function GetFilesList(Val Archive, Val Password = "") Export

ParameterCLI optionTypeRequiredDescription
Archive--srcString, BinaryDataPath to the archive on disk or binary data
Password--passwordStringarchive password, if required
Returns

Map Of KeyAndValue - Information about files in the archive

tip

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


1C:Enterprise/OneScript code example
ArchivePath = Parameters["SevenZ_ArchivePath"];

Result = OPI_7z.GetFilesList(ArchivePath);
oint 7z GetFilesList \
--src "/tmp/1jxe04za.q5m" \
--password "***"
Result
{
"entries": [
{
"directory": true,
"entries": [
{
"compressed_size": 15,
"directory": false,
"name": "note.txt",
"size": 11
}
],
"name": "docs"
},
{
"compressed_size": 20,
"directory": false,
"name": "readme.txt",
"size": 16
}
]
}