Collection

Extract Archives

Extracts ZIP, 7z, RAR, TAR and GZ archives, including archives inside archives, into a new folder with a hash-verified, row-by-row record of every entry.

Free Command line: extract-archives Version 1.1

Extract Archives opens each archive in the input and writes its contents to the run's files folder, next to a record of every entry: where it came from, how deep it was nested, its size, its original modified time and its hashes. The archives themselves are only read.

Evidence archives can be damaged or deliberately hostile, so the tool keeps every entry inside the extraction folder (no writing outside it via ..\ or drive paths), stops an archive that expands beyond a size limit, skips links, and reports password-protected entries rather than failing. One bad entry never hides the others: each gets its own row.

Use it when

How to run it

  1. Choose the folder holding the archives as Input, and an Output folder outside it.
  2. Set nested-depth for how many levels of archives-within-archives to open (3 by default).
  3. If the archives are encrypted, enter the password.
  4. Leave Max GB per archive at 20 unless you know an archive is genuinely larger.
  5. Choose the Hashes to record.
  6. Click Run, then Open report and filter the Status column for anything other than Extracted.

Settings

Every setting has the same help beside it in the app. On the command line, pass each as --name value; ltk help extract-archives lists them.

Settings

SettingWhat it doesType and default
Nested depth
--nested-depth
Also extract archives found inside archives, up to this many levels (0 = only the archives in the input).
An archive found inside an archive is written out as a file (with its own row) and then also opened, until this depth is reached. With 0, only the archives in the input are opened, and any archive inside them is left as a file. Office files such as .docx are ZIPs internally but are always left as documents.
number
3
Max GB per archive
--max-gb-per-archive
Stop extracting an archive (including everything nested inside it) after this many GB, to protect against 'zip bombs'.
One budget covers a top-level archive and everything nested in it, and every byte actually written counts, whatever size the archive claims. When the limit is reached the archive is stopped with Error: size limit reached. Raise it only if the archive is genuine.
number
20
Password
--password
Optional password for encrypted archives. It is used for this run only and is NOT saved in the manifest or job file.
Used for this run only; it is not saved in the manifest or job file. Without it, encrypted entries are listed as Skipped: password protected and the notes tell you how many.
text
empty
Hashes
--hashes
Hashes to record for each extracted file. Every file is verified after writing.
Every extracted file is verified after writing. The hashes chosen here are the ones shown in the report.
choices: MD5, SHA1, SHA256
MD5,SHA1

Common settings

SettingWhat it doesType and default
Input required
--input
Folder (or single file) to read. It is opened read-only and never modified. folder
empty
Output required
--output
Folder for reports. Must not be inside the input folder. Each run gets its own sub-folder. folder
empty
Recurse
--recurse
Include sub-folders. yes/no
true
Extensions
--extensions
Only process these extensions (e.g. .pdf, .docx). Empty means the tool's default set. list
empty
Parallelism
--parallelism
Files processed at once. Use 1-2 for spinning disks or network shares. number
4

What you get

Each run creates its own folder inside the output folder, with the report extract-archives.csv, errors.csv and manifest.json (see Run folders and manifests).

Report columns

Check the result

Tips
  • By default only .zip, .7z, .rar, .tar, .gz and .tgz files are treated as archives; use Extensions to narrow this further.
  • ZIP files store local clock time with no time zone, so their times are read as this computer's local time (as Explorer and 7-Zip do). 7z and TAR times are stored in UTC.
  • Run File Inventory on the files folder afterwards for detected file types and an extension-mismatch check.
Watch out for
  • Entries that are links are not followed; they are listed as Skipped: link to ….
  • Unsafe entry paths are cleaned (for example .. and drive letters are dropped), so an extracted file may sit at a slightly different path from its EntryPath. Use the Destination column to find it.
  • An archive with more than 1,000,000 entries is stopped as a safety measure.

From the command line

The command line is part of LitTechKit Pro. See Command line.

ltk run extract-archives --input "D:\Matter\Received" --output "D:\Matter\Extracted" --nested-depth 3 --hashes md5,sha256

Related tools