Inventory

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.

Free Command line: file-inventory Version 1.0

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

How to run it

  1. Choose the folder to list as Input, and an Output folder outside it.
  2. Leave Recurse on to include sub-folders.
  3. Choose the Hashes to calculate (MD5 and SHA-1 by default; none for a faster listing).
  4. Optionally narrow the run with Extensions.
  5. 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

SettingWhat it doesType 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, 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 file-inventory.csv, errors.csv and manifest.json (see Run folders and manifests).

Report columns

Check the result

Tips
  • 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.
Watch out for
  • 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 .xlsx renamed .docx is not flagged. The same applies to .doc, .xls, .ppt and .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