From TotalcmdWiki
Jump to: navigation, search

http://matbal.drivehq.com/ old website http://mitglied.lycos.de/matbal/ is now offline

Here is an english readme, translated from the german xcd.html:

XCD - eXtended Change Directory for Total Commander

(tested with Total Commander 6.03a)


Copy xcd.exe to a directory in the 'PATH' (e.g. C:\WINDOWS\ or

Starting the program:

XCD is invoked via Total Commander's command line.  Simply type XCD and
the "target_directory".  (target_directory is the name of the directory
you want to change into.)

   xcd <target_directory>

In the appearing dialog all (or similar) directories of the same name
are listed with complete path (or similar ones if no directories of
the exact name were found).  Now select the directory and click [OK] or
press Return.

Note: XCD uses the file "treeinfo.wc" for finding the target_directory.
By default Total Commander puts that file to the root directory on each local drive.
If this file is missing or is no longer current, XCD might not function

Treeinfo.wc can be updated with Total Commander or with xcd.

Update treeinfo.wc using Total Commander:

Run the "CD Tree" command (Alt+F10) to open the Directory Tree dialog box,
then press F2 to re-scan the tree.

Update treeinfo.wc using xcd:

Enter on TC command line    |  Effect
xcd /tree or xcd /treeinfo  |  Treeinfo.wc will be updated on all local drives
xcd /fg                     |  Treeinfo.wc will beupdated only on the indicated
                            |  drives F: and G:

Change directory:

In the following table, <target_directory> is the name of the directory
to be changed into.  The parameter before <target_directory> indicates the
initial position of the search in the directory tree.

The standard behavior of XCD when called without parameters before
<target_directory> can be specified in the configuration dialog
(function key [F12] or context menu in the XCD window).  The initial
position of the search is always indicated in the status line if the
search is limited to a drive or a directory.

Enter on TC command line    | Effect
xcd <target_directory>      | Search for target_directory in all
                            | possible paths.  Total Commander changes to
                            | the directory you select from the results.
xcd                         | Brings up the last search results.
xcd \ <target_directory>    | Search for target_directory only on the
                            | current drive. ("\" stands for root of the
                            | current drive)
xcd . <target_directory>    | Search for target_directory in the current
                            | directory and below. ("." stands for the
                            | current path)
xcd C: <target_directory>   | Search for target_directory only on drive C:

* XCD supports wildcards for target_directory ("*" or "?")
  e.g. "xcd win*"

* target_directory can also contain multiple directories
  e.g. "xcd winamp\plugins"
       "xcd e: winamp\plug*" (to the WinAmpPlugin directory)

* the search function is error tolerant,
  e.g. "xcd windos" finds among other things c:\windows

The input line below the list of search results always shows the last
search word entered.  A new search can be started by entering a new
search word.

Operation of the dialog box:

Keyboard     | Mouse                        | Effect
up/down      | click on path in list        | Select directory in results
             |                              | list.
Ctrl+up/down | double-click on path in list | (*) Select directory in
             |                              | results list and change
             |                              | directory in Total Commander
             |                              | panel immediately.
RETURN       | click [OK]                   | (*) Change directory and
             |                              | close xcd.
space/Ctrl   | click [Übernehmen] (Apply)   | (*) Change directory without
             |                              | closing xcd.
ESC          | click [Abbruch] (Abort)      | Close xcd.
plus/minus   | click [<-] or [->]           | Change tolerance threshold.
             |                              | Lists directories matching
             |                              | target_directory less than
             |                              | exactly.
Alt+down     | click arrow on input line    | Opens search history (drop
             |                              | down menu).

(*) With SHIFT key pressed at the same time (or right mouse button) the
behavior differs as follows:  Change directory to the parent of the
selected directory instead of changing into the selected directory.  This
can be specified as the default behavior in the configuration dialog.

Keyboard Instructions

The following keys allow you to temporarily change the search options
within the open window.  The search results are immediately updated.  The
search options used when XCD starts can be changed in the configuration
dialog [F12].

Keyboard          | Effect
number pad [*]    | the search word is extended automatically with
                  | *-Wildcards. (on/off)
number pad [/]    | only search the current drive (on/off)
number pad [0]    | error tolerance deactivated (on/off)
A                 | Allow directory search on all drives
C to Z            | Limit directory search to the selected drive

Function keys used in XCD.

Function key [F1] | Help (not yet done)
Function key [F2] | Update treeinfo
Function key [F3] | Set selected directory as new starting directory for
                  | the next search. (*)
Function key [F4] | Undo the effect of [F3] (*)
Function key [F5] | Show directory history
Function key [F12]| Configuration dialog with program settings is opened.

(Right-click in the XCD dialog box to open a menu of these function keys.)

(*) As long as no new search word is entered, all subdirectories of the
starting directory are shown.  Thus [F3] can show all the subdirectories
of a directory and [F4] returns.

XCD Over A Network

XCD can also find directories over a network.  The tree structure of
directories shared in the network must already been scanned.  If existing
directories are not found, "treeinfo.net" is not up to date.

Enter on TC command line            | Effect
xcd /net or xcd \\                  | Read in the directory structure of
                                    | the network shares
xcd \\ <target_directory>           | Changes to a directory in the
xcd /net <target_directory>         | network
xcd \\<computer> <target_directory> | Changes to a directory on a certain
                                    | network computer
xcd . <target_directory>            | Changes straight into a sublist
                                    | of the active directory (as with
                                    | local drives)


Configuration Dialog Box

Pressing F12 in the main window launches the configuration dialog box.

   Search Options
   note: The first three options can be changed also temporarily in
   the main dialog.

   * Automatically extend search word with *-wildcards
     This option causes the search word to behave as if it's surrounded,
     front & back, with * wildcard characters.  This causes directories
     to be found that contain the search word.

   * Search only in the current drive
     Only finds directories on the same drive from which XCD was called.

   * No error tolerance permitted
     Normally XCD matches directories that deviate slightly from the
     search word if no exact matches were found.  Thus, even with typing
     errors, the desired directory can be found.  This behavior can be
     turned off here.

   * Save settings when XCD terminates
     This option refers to the main window of XCD and the first three
     options.  If this option is set, the first three options retain their
     settings with the next call of XCD.

   Directory change option

   * Only select Target Directory:
     Instead of changing into the selected directory, change to the parent
     of the selected directory.  The cursor remains on the directory.
     (Restriction: This function only works with directories with read

   * Single match changes to the directory immediately:
     If only one matching directory is found, change to it immediately
     without showing the result window.

   Window option

   * Program window always on top:
     The XCD main window always remains in the foreground, even if it is
     not the active window.

History settings:

   * Maximum number of search words (Maximale Anzahl der Suchbegriffe)
   * Maximum number of directories (Maximale Anzahl der Verzeichnisse)

     The number of entries refers only to the number stored when
     terminating XCD. As long as XCD is opened, all entries are accepted.

   * Delete (Löschen):
     Deletes both histories.

Settings for the Treeinfo.wc:

   Personal Treeinfos

   * Alternate location for personal Treeinfos
    (Alternativer Speicherort für persönliche Treeinfos):
     Specifies an alternate location for the Treeinfo files if the root
     directory should not be written or if one wants to work with
     customized Treeinfos. If a Treeinfo is not found, a reference
     window appears.

   * Use additional global Treeinfos, if no personal Treeinfos were found
    (Globale Treeinfo verwenden, wenn persönliche fehlt):
     If this option is active and the personal Treeinfo is not found,
     then the global Treeinfo is used.  If both Treeinfos are missing,
     the reference window appears.

   Exclusion of directories and drives:

   * Exception list for directories to omit from the treeinfo
     The entries specified in this list are abort conditions when reading
     the Treeinfo.wc. The entries are evaluated in RegExp syntax.

   Entry        meaning
   temp         Exclude directories which contain "temp"
   \\temp       Exclude directories which begin with "temp"
   temp$        Exclude directories which end with "temp"
   \\temp$      Exclude directories which are called "temp" exactly
   \\temp\\     Exclude subdirectories after "temp"

   * Maximum directory depth
     Specifies the maximum number of subdirectories that can be read into
     the treeinfo files.  Directories which lie more deeply are not
     included in treeinfo.  If here nothing (or 0) is entered, then this
     function is deactivated.

   * Drives excluded by XCD
     Lists drive letters that XCD should ignore.  Simply list the drive
     letters to be excluded one behind the other.  This setting affects
     both reading the treeinfo and the directory search.

   * Treeinfo.wc update button
     This button re-scans the directory structure and updates the
     treeinfo.wc file.  The settings of the main dialog are used, so if
     the search is limited to a specific drive, only the treeinfo file
     for that drive is updated.

Explanations concerning the error tolerance

With active tolerance:  When searching for matching directories, XCD
allows deviation from the search word for each directory.  That means: How
many characters must be exchanged/added/omitted for the search word to
agree. The directories with the smallest deviation are then listed.

With the tolerance keys the tolerance threshold can be further increased
(up to max. 50%).  Directories that differ by more than half are not

To disable error tolerance, simply set the threshold to 0.  Thus only
exact matches are found (with higher search speed).

Explanation concerning the exception list (in the Treeinfo options)

The directories listed here are abort conditions when reading the
directory structure.  All directories must be entered as "regular
expressions" (RegExp) therefore the double backslashes in the list.
All directories on a drive are read successively and compared with the
list entries and matching directories are skipped.

When reading the directory structure, each directory path is in this form:

   x:\dir1\dir2 (notice no backslash at the end.)

The entry: \\dir2$  matches the path ($ stands for line end)
the entry: \\dir2\\ doesn't match the path (It does match this path:

that means:

   = directory will be read into the Treeinfo, but its subdirectories are

   = directory and its subdirectories are omitted.

Further examples

   D:.*\.bak$ = on drive D: no directories that end with ".BAK"

Back to Shell Extensions and AddOns