Reconcile Folders
Compares two folders by content hash, file name or name without extension, and lists every file missing from either side.
Reconcile Folders answers the question "is everything here also there?" It checks each file in the Input folder against a second folder (compare-to) and then lists every file in the second folder that had no counterpart in the input. Both folders are only read.
Matching can be by identical content (MD5 hash), by exact file name, or by the name without its extension, which suits comparing native files with produced PDFs.
Use it when
- You need to confirm that a copy sent to a vendor or the other side arrived complete.
- You want to check what was collected against what was produced.
- You need to match native files to their produced or converted versions by name.
- You suspect files were dropped or added between two versions of a folder.
How to run it
- Choose the first folder (for example, the collection or what you sent) as Input.
- Choose the second folder (for example, the production or what arrived) as Compare to.
- Choose an Output folder outside both folders.
- Set match-by to Hash, FileName or Stem.
- 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 reconcile lists them.
Settings
| Setting | What it does | Type and default |
|---|---|---|
Compare to--compare-to |
The folder to check against, e.g. the production or the copy you sent. Read-only, like the input. Must be a separate folder: the run stops if either folder is inside the other, or if the output folder is inside the compare-to folder. Recurse and Extensions apply to both sides, so a filtered run compares like with like. |
folder empty |
Match by--match-by |
Hash: identical content (best for copies). FileName: same name. Stem: same name ignoring extension (natives vs produced PDFs). Hash compares content (MD5), so it finds copies even if they were renamed, but reads every file on both sides. FileName compares the full name including extension. Stem compares the name without extension, so ABC0001.docx matches ABC0001.pdf. Folder location is ignored in every mode. |
choice: Hash, FileName, StemHash |
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 reconcile.csv, errors.csv and manifest.json (see Run folders and manifests).
reconcile.csv: Input files first, one row each, with Side = Input and Status Found or Missing from compare-to; Matches and MatchedPaths show the matching file or files on the other side. Then one row for each compare-to file with no match in the input (Side = Compare-to, Status = Not in input). Key is the hash or name used to match.
Report columns
SideRelativePathFileNameSizeBytesStatusMatchesMatchedPathsKeyFullPath
Check the result
- Read the notes: they give the number of input files with no match and the number of compare-to files with no match.
- Filter Status for
Missing from compare-toandNot in input. - Check rows where Matches is more than 1: the same content or name appears more than once on the other side.
- Look at
errors.csv. If files in the compare-to folder could not be read, a note warns that some input files may show as Missing even though a copy exists.
- Use Hash for copies, transfers and backups, where content should be identical.
- Use Stem to check a production against natives, where the produced file has the same name but a different format.
- Swap Input and Compare to if you want the detailed Found rows for the other side.
- Compare-to files are listed only when nothing in the input matched them; matched compare-to files do not get their own rows.
- Name matching ignores case and folder, so two different documents with the same name in different folders will match each other. Use Hash when names are not unique.
From the command line
The command line is part of LitTechKit Pro. See Command line.
ltk run reconcile --input "D:\Matter\Sent" --output "D:\Matter\Reports" --compare-to "E:\Delivered" --match-by Hash
Related tools
- File Inventory: Lists every file with size, timestamps, attributes, hashes and detected file type, flagging extensions that don't match the content.
- 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.
- 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.
- Bates QC: Checks a Bates-numbered production for gaps, overlaps, duplicates and padding problems, and that every PDF page shows the right Bates number.