Files

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.

Free Command line: copy-folder Version 1.0

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

How to run it

  1. Choose the folder to copy as Input and an Output folder outside it.
  2. Choose the Hash to verify with.
  3. Set Retries and Retry delay (seconds); raise them for unreliable network shares.
  4. Lower Parallelism to 1 or 2 for spinning disks or slow shares.
  5. Click Run.
  6. 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

SettingWhat it doesType 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, SHA256
MD5
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.
number
3
Retry delay (seconds)
--retry-delay
Seconds to wait before each retry.
0 to 3,600 seconds, waited before each retry.
number
2

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.
Off: only the files directly in the input folder are copied, and sub-folders are not re-created.
yes/no
true
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. number
4

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).

Report columns

Check the result

Tips
  • Windows cannot create names ending in a dot or space. Such files and folders are copied ending in _ instead (so Dir. never merges with Dir), 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.
Watch out for
  • 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