Command Syntax: treediff

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 testing utility used to compare two directory trees to see if they have the same contents. You can use this to test the arcvback system by backing up some files, then restoring them to a different location and then running to compare the two.


The program does not use the config.ini file.

The full command syntax is:

treediff [-h] [-v] [-date] [-file] sourcedir targetdir

where the item in the square brackets are optional.

The sourcedir is the reference directory you want to compare against. The targetdir is some other directory (such as one that contains the results of a restore). When run without either the -date or -file parameters the command will tell you how many files and directories that are in the source directory are not in the target directory. This does not examine their contents so it happens very quickly.


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

The -v parameter turns on verbose progress reporting, listing each file and directory (in the source tree) that is examined.

The -date parameter causes it to compare the file time stamps of the two directory trees, this can be used to determine quickly if the directory trees are likely to be the same. Only one of -date or -file can be specified.

The -file parameter causes it to do a complete byte to byte compare of the contents of all the files in the two directory trees. Only one of -date or -file can be specified.

                back to home