Copy Folder
Copies a whole folder tree, including empty folders, to the output with every file verified by hash, timestamps preserved and temporary errors retried.
Copy Folder is a verified replacement for a Robocopy mirror. It copies the input folder into the run's files folder with the same structure, re-creates empty folders, and keeps the created, modified and accessed dates of files and folders. Several files are copied at once.
Every file is hashed while it is read, then the copy is re-read and hashed, and the two must match. A temporary read or write problem, such as a network drop or a briefly locked file, is retried; a failed hash check is never retried and is reported as an error straight away. The input is read only and never changed.
Use it when
- You need a verified working copy of a collection before processing it.
- You are moving data off a client drive or network share and need proof every file arrived intact.
- You would otherwise use Robocopy and want a per-file report with hashes.
How to run it
- Choose the folder to copy as Input and an Output folder outside it.
- Choose the Hash to verify with.
- Set Retries and Retry delay (seconds); raise them for unreliable network shares.
- Lower Parallelism to 1 or 2 for spinning disks or slow shares.
- Click Run.
- Read the notes, click Open report, and check
errors.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-folder lists them.
Settings
| Setting | What it does | Type and default |
|---|---|---|
Hash--hash |
Hash used to verify every copy: the source is hashed while it is read, the copy is re-read and hashed, and the two must match. The chosen hash is recorded for every file (SourceHash and DestinationHash, which always match for a copied file). Use the hash your matter's chain-of-custody records use. |
choice: MD5, SHA1, SHA256MD5 |
Retries--retries |
How many more times to try a file after a temporary read/write problem (e.g. a network drop or a file briefly locked). 0 means no retries. A failed hash check is never retried: it is reported as an error straight away. 0 to 100. Only problems that may go away are retried; a missing file, a path that is too long or a full disk is not. Each failed attempt's reason is kept in the row's Message. |
number3 |
Retry delay (seconds)--retry-delay |
Seconds to wait before each retry. 0 to 3,600 seconds, waited before each retry. |
number2 |
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. Off: only the files directly in the input folder are copied, and sub-folders are not re-created. |
yes/notrue |
Extensions--extensions |
Only process these extensions (e.g. .pdf, .docx). Empty means the tool's default set. Limits which files are copied. The folder tree is still re-created in full, so folders that held only other file types appear empty in the copy. |
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-folder.csv, errors.csv and manifest.json (see Run folders and manifests).
files\…: The copied folder tree, with the same relative structure as the input.copy-folder.csv: One row per file: RelativePath, SizeBytes, Status (Copied, or Copied after n retries), HashType, SourceHash, DestinationHash, Attempts, original CreatedUtc and ModifiedUtc, Destination and Message.errors.csv: Files that still failed after retries, folders that could not be created, and folder timestamps that could not be set.
Report columns
RelativePathSizeBytesStatusHashTypeSourceHashDestinationHashAttemptsCreatedUtcModifiedUtcDestinationSourcePathDestinationPathMessage
Check the result
- Read the notes: how many folders were re-created, how many temporary problems were retried, and how many files or folders were saved under a different name.
- Compare the report's row count with the number of files in the source, and open
errors.csv. - Filter Status for retries if the source was unreliable.
- Windows cannot create names ending in a dot or space. Such files and folders are copied ending in
_instead (soDir.never merges withDir), and the file's row says what it was saved as. - Junctions and symbolic-link folders are not followed; they are listed in
errors.csv.
- A file that fails its hash check is removed from the output and listed in
errors.csv; copy it again once the cause is found rather than trusting a partial copy. - Make sure the output drive has room for the whole folder before starting.
From the command line
The command line is part of LitTechKit Pro. See Command line.
ltk run copy-folder --input "\\fileserver\Client\Collection" --output "D:\Matter\WorkingCopy" --hash SHA256 --retries 5 --retry-delay 10 --parallelism 2
Related tools
- File Inventory: Lists every file with size, timestamps, attributes, hashes and detected file type, flagging extensions that don't match the content.
- Batch Files: Copies files, in folder order, into numbered batch folders (Batch_0001, Batch_0002…) of at most a set number of files and/or GB, with MD5 verification and a batches.csv summary.
- 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.
- 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.