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.
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
- A client or the other side has delivered documents as ZIP, 7z, RAR or TAR files.
- A collection contains archives (including archives within archives) that must be opened before inventory, search or processing.
- You need a record of exactly which archive and path each extracted file came from.
How to run it
- Choose the folder holding the archives as Input, and an Output folder outside it.
- Set nested-depth for how many levels of archives-within-archives to open (3 by default).
- If the archives are encrypted, enter the password.
- Leave Max GB per archive at 20 unless you know an archive is genuinely larger.
- Choose the Hashes to record.
- 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
| Setting | What it does | Type 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. |
number3 |
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. |
number20 |
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, SHA256MD5,SHA1 |
Common settings
| Setting | What it does | Type 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/notrue |
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. | number4 |
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).
files\<folder>\<archive name>_extracted\…: The contents of each archive, in its internal folder structure. A nested archive's contents go in a<name>_extractedfolder next to it. Each file keeps the entry's original modified time.extract-archives.csv: One row per entry: ArchivePath (nested archives are shown asbundle.zip > nested.zip), EntryPath, Level (1 for the top archive), Status, size, ModifiedUtc, Destination and hashes.
Report columns
ArchivePathEntryPathLevelStatusSizeBytesModifiedUtcDestinationMD5SHA1SHA256ArchiveFullPath
Check the result
- Read the notes: they give the number of files extracted, how many entries were password-protected and how many could not be extracted fully.
- Filter Status for
Skipped,ErrorandDamagedrows. Damaged statuses include Damaged: no files found, Damaged: stopped reading the archive and Damaged: contents incomplete (a ZIP whose index and body disagree, so some files may be missing). - Look at
errors.csvfor the detail of each problem.
- By default only
.zip,.7z,.rar,.tar,.gzand.tgzfiles 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
filesfolder afterwards for detected file types and an extension-mismatch check.
- 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
- File Inventory: Lists every file with size, timestamps, attributes, hashes and detected file type, flagging extensions that don't match the content.
- Deduplicate: Finds duplicate files by hash (and duplicate emails by their content), globally or per custodian. Reports every file as Unique, Master or Duplicate, and can copy out one copy of each.
- Keyword Search: Searches PDF, Word, Excel, PowerPoint, email and text files for keywords (with wildcards) or regular expressions. Reports every hit with context, hits per term, and files that could not be searched.
- Extract Mailbox (PST/OST): Extracts every email and other item from Outlook .pst and .ost files into .eml files in the mailbox's folder structure, without Outlook. Optional date range, folder and item-type filters; every item is reported and folder counts are checked.