Collection

Deduplicate

Finds duplicate files by hash, and duplicate emails by their content, across the whole collection or per custodian, and can copy out one copy of each document.

Free Command line: deduplicate Version 1.0

Deduplicate reads every file in the input and marks it Unique, Master or Duplicate. Files are duplicates when their hash is the same. The first file of each group in folder order (sorted as Windows Explorer sorts) is the master, so running it again on the same data gives the same result.

Emails are a special case: the same message exported twice, or from two mailboxes, often differs in its bytes. With emails-by-content on, .msg and .eml files are compared on their sender, recipients, subject, sent time, body text and the content of their attachments instead.

Use it when

How to run it

  1. Choose the collection folder as Input. For custodian deduplication, make sure each custodian is a top-level folder under it.
  2. Choose an Output folder outside the input.
  3. Set Scope to Global or Custodian, and choose the Hash.
  4. Leave emails-by-content on unless you want emails compared byte for byte.
  5. Turn on copy-unique if you want the deduplicated set copied out.
  6. Click Run, then Open report and filter the Status column.

Settings

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

Settings

SettingWhat it doesType and default
Scope
--scope
Global: keep one copy across everything. Custodian: keep one copy per custodian (each top-level folder under the input is treated as a custodian).
Custodian treats each first-level folder under the input as a custodian and keeps one copy per custodian, so the same file held by two custodians is Unique (or Master) in both. Files sitting directly in the input folder are grouped under the custodian (input root).
choice: Global, Custodian
Global
Hash
--hash
Hash used to decide that two files have identical content.
SHA-256 is the default. Choose MD5 or SHA-1 if you need the Key column to line up with hashes from another system.
choice: MD5, SHA1, SHA256
SHA256
Emails by content
--emails-by-content
Treat emails (.msg/.eml) as duplicates when sender, recipients, subject, sent time, body and attachments match — catches the same email saved twice or in different formats.
Two emails match only if sender, all recipients (To, Cc and Bcc), subject, sent time to the second, body text (spacing ignored) and the content of every attachment are the same. Emails that differ only in an attachment are not duplicates. An email that cannot be read, or has no sender, subject or sent time, is compared by hash instead. The MatchedBy column shows which method was used.
yes/no
true
Copy unique
--copy-unique
Also copy one file per duplicate group (the master) plus all unique files into the run folder, hash-verified.
Copies every Unique file and every Master into the run's files folder, keeping the folder structure and modified and created times, with a hash check on each copy. Duplicates are not copied and have a blank Destination.
yes/no
false

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 deduplicate.csv, errors.csv and manifest.json (see Run folders and manifests).

Report columns

Check the result

Tips
  • Because the first file in folder order becomes the master, name or arrange folders so the copy you prefer to keep sorts first.
  • Run with copy-unique off first to size the duplication, then run again with it on.
Watch out for
  • Deduplicate never deletes or moves anything in the input. For a deduplicated set, use copy-unique.
  • Content matching for emails is deliberately strict. Two copies of an email that differ in any recipient, the body text or an attachment stay separate.

From the command line

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

ltk run deduplicate --input "D:\Matter\Collection" --output "D:\Matter\Out" --scope Custodian --hash SHA256 --copy-unique true

Related tools