File Inventory
Lists every file in a folder with its size, timestamps, attributes, hashes and content-detected type, and flags files whose extension does not match their content.
File Inventory produces a one-row-per-file listing of a collection: name, folder, size, created, modified and last-accessed times (UTC), the hidden, system and read-only attributes, and MD5, SHA-1 and SHA-256 hashes as chosen. All the hashes are calculated in a single read of each file.
It also looks at the first bytes of each file to work out what it really is (PDF, ZIP or Office Open XML, OLE2 for .msg and older Office files, PNG, JPEG, GIF, TIFF, RTF, 7-Zip, RAR, GZIP, PST/OST) and flags a mismatch when the extension says otherwise, for example a PDF renamed .docx.
Use it when
- You receive a collection and need a record of what is in it before anything else is done.
- You need hash values for a list of files, for a chain-of-custody record or to compare with another party's list.
- You want to find files disguised with the wrong extension, or hidden and system files.
- You want to size a collection by folder or file type.
How to run it
- Choose the folder to list as Input, and an Output folder outside it.
- Leave Recurse on to include sub-folders.
- Choose the Hashes to calculate (MD5 and SHA-1 by default; none for a faster listing).
- Optionally narrow the run with Extensions.
- Click Run, then Open report.
Settings
Every setting has the same help beside it in the app. On the command line, pass each as --name value; ltk help file-inventory lists them.
Settings
| Setting | What it does | Type and default |
|---|---|---|
Hashes--hashes |
Hashes to calculate (MD5, SHA1, SHA256; none = no hashing). All are computed in one read of each file. Pick only what you need: each extra hash adds processing time but not an extra read. Choosing none still reads the start of each file to detect its type. |
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 file-inventory.csv, errors.csv and manifest.json (see Run folders and manifests).
file-inventory.csv: One row per file: RelativePath, FileName, Extension, Folder, SizeBytes, created, modified and accessed times (UTC), Hidden, System, ReadOnly, DetectedType, ExtensionMismatch, the chosen hashes and FullPath.
Report columns
RelativePathFileNameExtensionFolderSizeBytesCreatedUtcModifiedUtcAccessedUtcHiddenSystemReadOnlyDetectedTypeExtensionMismatchMD5SHA1SHA256FullPath
Check the result
- Filter ExtensionMismatch = True and look at those files: they may be renamed, disguised or simply mislabelled.
- Filter Hidden and System for files that may have been missed in an Explorer view.
- Check
errors.csvfor files that could not be read. - Keep
manifest.jsonwith the report: it records the settings and a hash of the report itself.
- Run it first on any new collection, and again after extraction or copying, to have a before-and-after record.
- The report is in the same order however many files are processed at once, so two runs on the same data can be compared line by line (apart from AccessedUtc, which reading the files can change).
- Open the CSV in Excel and use a pivot table on Extension or Folder to size the collection.
- A mismatch is only flagged for extensions the tool knows. Files of unknown type, empty files and unfamiliar extensions are never flagged.
- Word, Excel and PowerPoint files (and ZIPs) all share one detected type, ZIP / Office Open XML, so a
.xlsxrenamed.docxis not flagged. The same applies to.doc,.xls,.pptand.msg.
From the command line
The command line is part of LitTechKit Pro. See Command line.
ltk run file-inventory --input "D:\Matter\Collection" --output "D:\Matter\Reports" --hashes md5,sha256
Related tools
- Page Counts: Counts pages in PDFs and slides in PowerPoint files exactly, and reports Word's stored page count (as last saved).
- 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.
- Extract Archives: Extracts ZIP, 7z, RAR, TAR and GZ archives (including archives inside archives) into a new folder, with hash verification, original modified times and protection against damaged or malicious archives.
- Copy Files: Copies all files, or those matching a list of names or hashes, into a new folder with hash verification, preserved timestamps and a not-found report.