Introduction

This utility allows you to replicate the structure of a directory excluding files. Once replicated in another point, the directory tree can be compressed for backup (and restored anywhere).
The Copy Directory Tree Utility (from now cptree) is implemented as console application, so, for use it, you need to open a Command Prompt in Windows OS Family or some clone of bash in Linux or other Unix. In some Windows OS you can use cptree through MS PowerShell.

Latest available stable download: 1.1.0.2 stable.
Latest available download: 1.1.0.0 stable.
Latest available version on source code control @github: 1.1.0.3 beta (released 05 Jun 2012).

Installation

The low number of files (two: a main executable - cptree.exe - and a support library - CommandLine.dll -) that composes this software make it an optimal candidate for XCOPY deployment:

  • In the upper right section of this page click the release version number under the caption 'Current Release'.
  • Download the package marked as 'runtime binary' and named cptree-$VERSION$-bin-zip ($VERSION$ = version number, e.g.: 1.9-beta).
  • Unzip the file in a temporary location and create a new directory for host cptree's files (e.g.: C:\NoInstall\CopyDirTree).
  • Add your cptree directory (in our example: C:\NoInstall\CopyDirTree) to PATH environment variable (more on wikipedia and MS Support).

Usage

cptree is currently a young software and has few options, but its core function is used as follows (and will not change in future versions!):

Console:

C:\> cptree D:\Download Download_Tree


Issuing this command will replicate all directories inside the first directory excluding files (in the example, D:\Download), in the second one (C:\ DownloadTree_); the destination root directory can exist or not .
Invoking cptree specifying a single directory, will make the program list the complete directory content.

Mono Compatibility

I've worked some time with the beta release (1.0.50.7) under Linux/Mono without problems.
The 1.1 stable release was tested (and unit-tested) under Linux/Mono and it's working without any problem. Read the release page for more details.

Dependencies

Contacts

For bug reports and features requests:
Author's Blog
Author's E-Mail (now changed, gsscoder@gmail.com)

Last edited Jun 5, 2012 at 7:10 AM by gsscoder, version 40