Copy Files
Copies every file, or only the files named in a list of document names or hashes, into a new folder, proving each copy is exact and reporting any list entries that matched nothing.
Copy Files pulls documents out of a collection or production without touching the source. Every copy is written to the run's files folder, re-read and hash-checked against the original, and keeps the original created, modified and accessed times.
You can copy everything (narrowed by extension if you like), or paste a list of names or hashes, for example a list of document IDs from a review platform or a hash list from the other side. Entries that matched no file are listed in not-found.csv, so a short list is never silently treated as complete.
Use it when
- You have a list of document IDs or file names (from Excel, a review platform or a letter) and need those documents pulled out of a larger set.
- You have MD5, SHA-1 or SHA-256 values (for example from a privilege log or the other side's production) and need the matching files.
- You need a verified working copy of a folder, with timestamps kept and a hash record of every file.
- You want to check a list against a collection before copying anything (use dry-run).
How to run it
- Choose the folder to copy from as Input, and a folder outside it as Output.
- Set Select: All to copy everything, Names to copy files whose names are in a list, or Hashes to copy files whose hash is in a list.
- For Names or Hashes, paste the entries into List (one per line), choose a List file, or both.
- For Names, choose how names are matched with Match (Stem is the default).
- Choose Layout (Keep the folder structure, or Flatten into one folder) and the Hashes to record.
- Optionally turn on dry-run first to see what would be copied and where.
- Click Run, then use Open report to review the results and
not-found.csv.
Settings
Every setting has the same help beside it in the app. On the command line, pass each as --name value; ltk help copy-files lists them.
Settings
| Setting | What it does | Type and default |
|---|---|---|
Select--select |
Which files to copy: All, Names (from the list) or Hashes (MD5/SHA-1/SHA-256 from the list). If you give a list but leave Select on All, the run stops rather than ignoring the list and copying everything. Set it to Names or Hashes, or clear the list. |
choice: All, Names, HashesAll |
List--list |
Names or hashes to copy, one per line (paste from Excel is fine). Lines starting with # are ignored. Blank lines and lines starting with # are ignored, surrounding quotes and spaces are removed, and repeated entries are dropped (ignoring case). A name entry must be a file name, not a path: lines with characters that cannot appear in a file name are skipped and logged in errors.csv. A hash list can mix MD5, SHA-1 and SHA-256; the type is worked out from the length, and anything that is not 32, 40 or 64 hex characters is logged as an error.Shown when select = Names or Hashes |
text (lines) empty |
List file--list-file |
Optional text file with names or hashes, one per line. Combined with the list above. Shown when select = Names or Hashes |
file empty |
Match--match |
How names are matched: Stem (name without extension — catches every format of a document), Exact (full name), or Prefix (name starts with the entry; broadest, check the report). Stem compares the name without its extension (or the full name), so ABC0001 picks up ABC0001.pdf and ABC0001.docx. Exact needs the full name with extension. Prefix matches any file whose name starts with the entry, so ABC0001 also picks up ABC0001_attachment.pdf and ABC00012.pdf; where several entries fit, the longest is used. Check the MatchedItem column after a Prefix run.Shown when select = Names |
choice: Stem, Exact, PrefixStem |
Layout--layout |
Keep the source folder structure, or Flatten everything into one folder (clashing names are numbered, never overwritten). Keep recreates the source folders under files. Flatten puts everything in one folder; clashing names become name_(1).ext, name_(2).ext and so on, numbered in folder order so a repeat run gives the same names. Renamed copies are flagged in the Renamed column. |
choice: Keep, FlattenKeep |
Hashes--hashes |
Hashes to record. Every copy is verified by re-reading it and comparing hashes (SHA-256 is used if none are chosen). These are the hashes recorded in the report. Every copy is verified whatever you choose; if you choose none, SHA-256 is used for the check. When selecting by hash, the hash used to match does not appear in the report unless you also tick it here. |
choices: MD5, SHA1, SHA256MD5,SHA1 |
Dry run--dry-run |
Only report what would be copied and where; nothing is written except the reports. Writes only the reports. Each row shows Would copy (dry run) and the planned destination, and not-found.csv is still produced, so this is a quick way to test a list. |
yes/nofalse |
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 copy-files.csv, errors.csv and manifest.json (see Run folders and manifests).
files\…: The copies, in the original folder structure or flattened, with original timestamps.copy-files.csv: One row per file copied (or that would be copied): source path, MatchedItem (the list entry it matched), Status, Destination, Renamed, the chosen hashes and Verification (for exampleVerified (MD5, SHA1)).not-found.csv: List runs only: every list entry that matched no file, with its Type (Name, MD5, SHA1 or SHA256).selection-list.txt: List runs only: the cleaned list exactly as it was used, for the file record.
Report columns
RelativePathFileNameSizeBytesMatchedItemStatusDestinationRenamedMD5SHA1SHA256VerificationCreatedUtcModifiedUtcSourcePathDestinationPath
Check the result
- Read the notes: a list run says how many entries matched no file.
- Open
not-found.csvand follow up every entry in it. - Check
errors.csvfor list lines that were rejected and files that could not be copied. - After a Prefix match, scan MatchedItem for files you did not intend to pick up.
- Confirm Verification reads Verified on every row.
- Paste a column straight from Excel into List; quotes and stray spaces are cleaned off.
- Use Extensions with Select All to copy only certain file types.
- An entry counts as found if it matches any file, so one entry can bring back several formats of the same document under Stem matching.
- A copy whose hash does not match the original is treated as an error and the bad copy is removed; check
errors.csvand re-run for those files. - If the output drive runs out of space the run stops rather than failing every remaining file. Free space and run again.
From the command line
The command line is part of LitTechKit Pro. See Command line.
ltk run copy-files --input "D:\Matter\Collection" --output "D:\Matter\Out" --select Names --list-file "D:\Matter\requested-ids.txt" --match Stem --layout Flatten
Related tools
- File Inventory: Lists every file with size, timestamps, attributes, hashes and detected file type, flagging extensions that don't match the content.
- Reconcile Folders: Compares the input folder with another folder (by content hash or name) and lists files missing from either side — e.g. collection vs production, or what was sent vs what arrived.
- 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.
- Delete By File Name: Removes files whose names are on a list (exact, without extension, or contains). By default copies everything else to the output folder; in place, matched files are moved to the run folder's removed folder, never destroyed.