Command Syntax: treecopy

Copyright 2008 by Stephen Vermeulen
Last updated: 2008 Oct 12


This is part of a series of articles on backing up computers. The top page is Design for an Archiving Backup System.

This page describes the command line syntax of the program.


The program is a utility to copy a directory tree and do read after write tests to make sure the data was copied without error.

This will copy every file and directory from the source, it will save an SHA1 hash of each file (as it was read). It will set the file modification date on the target file to preserve the file date stamps.

Once the copy is done it will re-read each source file and recalculate the SHA1 to make certain the reads were done without error.

It will then read each file from the destination and calculate the SHA1 for it and compare it to the SHA1 that was recorded when the file was originally read.

It will output any errors to a log file.


The program does not use the config.ini file.

The full command syntax is:

treecopy [-h] [-v] sourcedir targetdir logfile

where the item in the square brackets are optional.

The sourcedir is the directory you want to copy. The targetdir is name of the copied directory. The logfile is the name of a file to put errors and results messages into.


The -h parameter will bring up a short syntax help prompt and then stop.

The -v parameter turns on verbose progress reporting, listing each directory (in the source tree) that is copied and re-read; as well as, each directory in the target that is verified.

                back to home