Documentation of ACD version 2.33, dated Sept. 26, 1994 (c) A. Merckens
First, before giving some documentation on ACD, I'll give some background
information on WHY I created yet Another Change Directory program.
What I liked about .....
NCD [Norton Change Directory - (c) Peter Norton]
- first program that made "fast" changing directories possible
- nice best guess when pathname is incorrectly spelled
- possible to remove "current" directory [NCD RD .]
- 'speed search' when window with directory information appears on screen
- possible to rename a directory
LCD [Led's Change Directory - (c) Keith Ledbetter]
- directory information on more than one drive at a time
- change to correctly specified directory EVEN if not in directory
What I disliked about ...
- only directory-information on one drive at a time
- directories are unsorted
- updates are unsorted [NCD MD dirname]
- messages that are driving me crazy when switching to a correctly
specified path [NCD d:\bin\dos40; I know, I know, I should have
specified NCD CD d:\bin\dos40]
- unwanted updates of directory-information when NCD encounters an unknown
- cannot write directory-information for network-drives
- cannot rename a directory on a network drive
- directories are unsorted
- updates are unsorted [LCD MD dirname], even worse than NCD
- pop-up window is too small when selecting from many directories
- not possible to remove "current" directory [LCD RD . ]
- not possible to explicitly give a drive name, e.g. LCD d:bi is not
- strange "BEST GUESS" when partial directory name could not be found
- not DV-aware
- if EGA/VGA 43/50 lines/page: on exit, the cursor is positioned at the
- not possible to remove directory-information (locally), without actually
removing directories: when network drives are scanned, quite often users
have the same directory names (consider: UTILS); however, you may not be
interested in these, and wish to remove 'useless' directory-information
- no 'speed search' when pop-up window with directory information on screen
[Well, in version LCD 4.0 - 10 days after first release of ACD 1.00 -
Mr. Ledbetter implemented this in the same way as ACD....]
So, I created Another Change Directory, which is, in my prejudiced opinion,
the best of these two worlds. ACD is very flexible: you can configure ACD to
act as you prefer. Due to many suggestions since the first public release, ACD
is still getting better. The most important changes since version 1.0 are:
- graphical display of paths
- scrollback history (i.e. ACD remembers the last few directory changes)
- menu for fast selection of directories in pop-up window
- substituted drives support
- removable drives support
About the program ACD
ACD is a program designed to have all the features I liked in LCD and NCD,
and also to have the features I (and many others) thought were missing in
these programs. Just like LCD, ACD makes changing directories much easier,
especially when you have a large harddisk with lots of different partitions or
are hooked on a network drive.
ACD works "across all drives" by maintaining the directory database of ALL
drives in the file C:\ACD.IDX (by default). This means that you don't have to
specify a drive letter when changing to a directory on a different drive.
However, you are allowed to specify the drive letter which will be used
to consider only the directories on the drive specified.
ACD [drive:]partial_dir[\][options]: change to a directory or present
ACD =[drive:]partial_dir : use scrollback history to change directory
ACD rd directory_name : delete directory; update database
ACD md directory_name : create directory; update database
ACD rd directory_name /local : delete directory-information recursively
below directory_name from database; do not
actually delete directories
ACD md directory_name /local : create directory-information; do not
actually create directory
ACD ren dir1 dir2 : rename dir1 to dir2; update database
ACD /create : scan drives and create directory database
ACD /qcreate : scan drives (ignore dirs with extensions)
and create directory database
ACD /add : scan drives and add to directory database;
existing info on a drive will be replaced
ACD /qadd : scan drives (ignore dirs with extensions)
and add to directory database
ACD /recreate : rescan the drives which are mentioned in
the directory database
ACD /qrecreate : rescan drives which are mentioned in the
directory database (ignore dirs with
ACD /reverse : reverse the colors
ACD /?, or ACD /h : short help
/c[x] , x = 0..2 : select Current drive [toggle between 3
values]; see below.
/e[x] , x = 0..1 : Exact match [toggle]: switch to directory
if exactly one directory name is found in
the ACD database with this exact name.
/i[x] , x = 0..1 : test Inactive drives [toggle]
/g[x] , x = 0..1 : Graphical display of paths [toggle]
/l[x] , x = 0..1 : highlight selection Line [toggle]
/m[x] , x = 0..1 : show Menu with choices [toggle]
/s[x] , x = 0..2 : Shrink searchstring [toggle between 3
values]: see below
/u[x] , x = 0..4 : How to act when Unknown directories are
encountered. [toggle between 5 values, see
/w[x] , x = 0..1 : 0 = switch to directory as soon as one
1 = when in popup, switch to directory
only if a menuchoice has been given, or
the -key has been pressed.
/0[x] , x = 0..2 : default commandline (0 pars) [toggle
between '*', '=' and empty]
/x[address] : ONLY if ACD is called from within another
program; see "Calling ACD from another
program" for details.
/wipe[x], x=0..1 : 0 = disable "wipe"-option (ALT-W; erase
files and directories) in popup-window
1 = enable "wipe"-option in popup-window.
These switches can also be set without toggling, by adding a digit, say [x]; 0
means OFF, 1 means ON. E.g. the /i toggle can be set to be ON by /i1,
independent of the previous value. In the case of the /0 option, /00 means
empty /01 means '*' and /02 means '='.
The /c[x] option tells ACD which drive-information it has to consider:
0: (/c0) consider all drives mentionted in ACD.IDX.
1: (/c1) only consider the current drive using ACD.IDX; if the current
drive is removable, use the ACD.IDX on the removable drive.
1: (/c2) consider all drives mentioned in ACD.IDX, except if the current
drive is a removable drive: consider the current drive and use the
information on the removable drive itself!
The /s[x] option will change ACD's behaviour when no directories are found
that match the original searchstring:
0: (/s0) do not shrink searchstring; abort with an error
1: (/s1) shrink searchstring and try again
2: (/s2) shrink searchstring and try again. Always show popup, even if
only one directory matches the shrunk searchstring.
Note: You can also use ACD_CFG to configure ACD on how ACD should use the
searchstring to display directories
The /u[x] option will change ACD's behaviour when ACD encounters an Unknown
0: (/u0) do not add unknown directories to ACD-database
1: (/u1) add when parent is in the ACD-database
2: (/u2) add when parent is in the ACD-database, and add also all
3: (/u3) if parent is NOT in the ACD-database, go back until parent IS
in the ACD-database; add all unknown directories starting from this
4: (/u4) rescan complete drive (of course, only if information on this
drive is in the ACD-database)
ACD is used to switch quickly between directories across any drive. You
simply invoke ACD and give it the full or partial name of the directory you
wish to change to. For example, if you have a directory named D:\COMM\KERMIT
you could switch to this directory with the command:
C:\> ACD ker
ACD will first try to do an immediate change to the directory name that you
specify. If that change works, ACD simply exits immediately. If it fails,
then ACD looks into your directory database and tries to figure out the
directory name that you wanted. If more than one directory existed with the
same partial name that you gave to ACD, it will display a pop-up window on
the screen containing all of the matches found. Simply use the movement
keys (PgUp, PgDn, Home, End, Arrow keys) to highlight the directory that you
want to change to, then hit .
If the 'current directory' is included in the partial match set, the
highlight is positioned on this directory (sort of like "you are here"),
otherwise, the highlight is positioned on the first match.
Within the pop-up window, a 'speed search' is available, i.e. when you
press a key which doesn't have a special function (see below), then the
character is added to the 'partial name' you entered at the command-line,
the pop-up window will possibly be resized and the new selections will be
shown if more than one directory exists with the same partial name: as soon
as exactly one directory is selected by speed search, the directory will be
selected without further confirmation.
By pressing * the method of partial name search is toggled. Normally, ACD
matches the partial name at the start of the last part of the directory.
When pressing * once, it will match the partial name anywhere in the last
part of the directory (see example below). If you press * again, the first
method is used again. Using ACD_CFG you can configure ACD to your preferred
If you press \, then all subdirectories of the current selection are shown
as well; if you press \ again, the previous state is restored.
If you press ESC, the operation will be aborted.
The + key makes the highlighted line point to the next drive in the
selection window, and the Tab or ArrowRight makes the highlighted line
point to the next directory with the same parent as the currently
highlighted line. If you press the Ctrl-key and the Arrow-Left key
simultaneously, then the highlight will go to the parent of the currently
By pressing ALT-C simultaneously, the highlighted path will be centered on
the screen, allowing you to see the directories above and below the
highlighted path. By pressing ALT-T simultaneously, the highlighted path
will be put on top of the screen.
Summary on the action of keys when in pop-up window:
Note: sibling means entry with the same 'parent'
F1 : gives help on the special keys
Pg-Up : go to top of page, or go one page up
Pg-Dn : go to bottom of page, or go one page down
End : go to last entry
Home : go to first entry
Arrow-Up, ^E : go to previous entry
Arrow-Dn, ^X : go to next entry
Tab : go to next sibling
Shift Arrow-Up : go to next sibling
BackTab : go to previous sibling
Shift Arrow-Dn : go to previous sibling
Arrow-Left : go to 'parent' of currently highlighted path
Ctrl Arrow-Left: go to 'parent' of currently highlighted path
ALT-C : Center highlighted path in popup-window
ALT-E : Execute External program (see 'patches')
ALT-G : toggle Graphic display
ALT-L : toggle method of highlighting current selection; the
whole Line is highlighted, or only the last
ALT-M : Make new directory in highlighted path
ALT-N : reName highlighted directory
ALT-P : Print current selections to printer or file
ALT-R : Remove highlighted directory tree (locally)
Alt-S : Scan highlighted directory for missing info
ALT-T : put highlighted path on Top of popup-window
ALT-W : Wipe directory. All files will be erased (except for
read-only and hidden files) and the directory will be
+ : go to first entry of next drive
* : toggle search method
= : toggle scrollback history
\ or / : toggle display of all subdirectories of current
: : toggle drive selection: all drives/highlighted
Enter : switch to highlighted entry
A..Z : when the path's are preceded by capital characters,
then these can be chosen to select a directory (see
the /m option how to disable this menu)
Esc : abort operation
BS, Del : delete character from partial name for 'speed search'
other char. : add character to partial name for 'speed search';
'?' has the common wildcard meaning
C:\> ACD do
If this selects more than one directory, a pop-up window will be shown on
In this case, two directories are selected. By using the arrow-keys and the
, or by pressing the next character (r or s), or by pressing a menu
choice (the capital characters A or B), a selection can be made.
By pressing the *, you will 'toggle' the method of string-searching, and
you'll get a pop-up window equal to the command:
So, for example:
By entering * again, the first screen will be shown again.
When you press \, you may get the following screen:
This is the so called "graphic" presentation; if you press ALT-G, you will
get the following screen:
If you prefer the non-graphic presentation, you may add the /g switch, or
or use the /g switch in the environment variable ACD, or configure ACD with
By entering \ again, you will get the selection screen with 4 matches
again. You can specify from the commandline which search method has to be
used, and/or if all subdirectories of the selection have to be shown by
starting with a star ("*") and ending with a backslash ("\"), for example:
will yield the previous screen directly from the commandline.
Note that as soon as exactly one directory is selected by Speed Search, the
directory is selected, without further confirmation.
By default the last subdirectory of the path that indicates the current
selection is highlighted; if you want the whole line highlighted, you can
add the /l option to ACD, or press ALT-L in the pop-up window.
By default, all drives that are mentioned in the pop-up window are tested
for their existence. This ensures that only directory information of the
active drives is displayed. If you don't like this, or if testing your
drives is S L O W then you may add the /i option. ACD will then display
also the information of the (possibly) non-active drives. If you would like
to make this the default, then you could configure (=patch) ACD using
ACD_CFG, or use the environment variable ACD.
If you KNOW you wish to change to a directory on the default drive, you
ACD dir /c
which will only show you the matching directories on the current drive; If
you KNOW you wish to change to a directory on the G-drive (for example),
then you may specify
which will only show the matching directories on the G-drive. If a
selection is shown, and you change your mind about the drive specification,
then you may press : which will result in showing the matching directories
based on all drives, as if you did not include G: or the /c option from the
Note that if G: is a substed drive or a network drive equal to, say, F:,
then the information on drive F is used to display the paths in G:
Starting from version 2.20, if you have set the option /c1 or /c2, ACD will
know about removable drives. Suppose B: is a removable drive, and you give
the command ACD B:*, then ACD will first search for the file B:\ACD.IDX. If
it does not exist, it will create one. Then it shows the popup on this
If the information is outdated, you can also recreate the B:\ACD.IDX like
B:> ACD /CREATE B
B:> ACD /RECREATE
anydrive:> ACD /CREATE B: (Note the ":")
ACD will update the B:\ACD.IDX if you create/rename/remove directories
using ACD, and the /c-option has a value of 1 or higher.
If the current drive is the B drive, but you wish to switch to a directory
on another drive, you can do this by adding , or by adding /c0 (or
/c if the default value of /c equals 2)
Each time you change to a directory using ACD and using information in the
ACD-database, information is written to the ACD-database to remember the
directory you just changed to. By default the scrollback history will
remember up to 20 directories. Since ACD now writes each time it is used to
change to a directory, the performance on a XT might be slow. If you don't
want to use the scrollback history function for this or another reason, you
may change the history size to zero. You can use ACD_CFG to make this
When you changed to a few directories and wish to return to one of them,
you may enter:
Now a pop-up window will appear which will show the directories you have
Once again, you can use speedsearch or the keys mentioned above to make a
selection. You may also call speedsearch from the commandline, by
specifying, for example:
which will present a partial match set using ONLY the last "historysize"
(default: 20) directories you changed to. The first entry on screen is the
last directory you changed to, etc.
You can also toggle easily between two directories by entering
which will let you jump directly to the second directory in the history
list: the directory you just came from. You can also jump to the third
directory in the history list directly by entering:
or in general to the "number"th directory in the history list.
However, if, for example, the directory 4DOS is in the history list, and
then the directory 4DOS is selected, and not the fourth directory in the
The scrollback history is destroyed when you enter CD /add [drive], or CD
/[re]create [drive]. This shortcoming can be used as a feature: to clear
the history just add a non-existing drive, for example:
ACD /add @
Note that if you change to a directory directly - i.e. ACD does not have to
use information from its database - ACD does not add information to the
scrollback history. So, for example, if the directory C:\DOS40 exists, and
then this information is not added to the scrollback history. However, in
this case, if you would have entered
and selected C:\DOS40, then the information WOULD be added.
The first time you execute ACD, you must specify the /CREATE parameter
("ACD /create") which instructs ACD to scan all of your hard drives and
create a file called ACD.IDX in the root directory of drive C. Depending on
how you will create/remove your directories in the near future, it may be
necessary to periodically rescan your drives.
If you only want ACD to know about certain specific drives (for example:
only non-network drives), you can specify a drive list after the /CREATE
keyword. To have ACD only scan drives C, E, and G, just enter:
C:\> ACD /CREATE CEG
If at any stage, you wish to add information about another drive, say drive
F, then you could enter:
C:\> ACD /ADD F
If you are sure that you don't have subdirectories which have an extension
in their name (for example, C:\PROGRAMS.OLD\) then you can specify
/QCREATE, (/QADD), instead of /CREATE (/ADD). This causes ACD to scan
approximately 33% quicker than without the Q.
From version 1.03: if you ADD a drive for which already information is
stored in the directory database, this information will be replaced by new
information at the end of the information database, so no redundant
information will be stored.
From version 2.10: if you are using DOS 3.0 or higher, then ACD will not
include SUBSTed or ASSIGNed drive information, or include network mappings
which have already been included in ACD.IDX, unless explicitly entered,
because ACD can deduce it from the "real" drive; e.g. if you have defined
E: with the DOS-command
SUBST E: C:\SOURCES
then drive E: will not be scanned with a
Information on the C: drive will be stored in this case and the SUBSTed E:
drive won't be stored. However, if you enter:
then ACD searches for a match using the information it has on the
subdirectories of C:\SOURCES.
The main advantage of this method is, that if you create a directory
C:\SOURCES\ARCHIVE, then the database will be directly up to date.
Furthermore, even if you use a different E: drive SUBSTitution, the
information is directly updated. A disadvantage might be, that by default
only the original directory-names will be taken into account when
searching for a match (in this case C:) are shown, unless you add the /C1
switch, or explicitly add .
Of course, you can still use the "old" method (i.e. the method use by ACD
version <=2.01), by entering
ACD /CREATE CE
You can also recreate the update ALL information in the ACD.IDX file by
The drives mentioned in the ACD.IDX file will then be scanned again.
Direct database updating:
You can also use ACD to create, remove and rename directories with
immediate database updating. This means that you don't have to rescan your
drives to update the directory database. ACD will create, delete or rename
the directory specified, and then update the ACD.IDX database at the same
time. For example, to create a directory on drive F: and put that directory
in the database, you'd do:
C:\> ACD md f:\temp
This ability comes in especially handy for users of command shells that
allow aliasing, such as CED and 4DOS. With these utilities, you can change
the standard MD and RD commands to invoke ACD instead. With 4DOS, you could
set up the aliases like below in a file called, say, C:\ALIASES
md ACD md %&
rd ACD rd %&
cd ACD %&
rendir ACD ren %&
Now you can give in 4DOS the command (or add to your AUTOEXEC.bat)
alias /r c:\aliases
Note: the last line - ACD ACD.EXE - is not necessary if ACD.EXE
is in your search PATH; however, a program which has just a simple task -
in this case 'change directory' - executes much faster if the PATH does not
have to be searched.
Another suggestion: if you have defined an alias for CD and wish to change
to the previous directory, enter CD.. (without space) instead of CD ..
(with space), since in the first case ACD will not be called to execute
this very simple task and consequently no loading of the program has to
take place, and thus changing to the previous directory will go faster
(especially noticeable on an XT), with less typing.
When the pop-up window is on screen, you can also use the ALT-R combination
to remove the highlighted path by answering the question
When the pop-up window is on screen, also a more DANGEROUS keycombination
can be used: ALT-W (Wipe directory). All files will be erased (except for
read-only and hidden files) and the directory will be deleted. The question
will be asked. The answer "R" means 'recursively', and all files and
directories in the highlighted directory, its child-directories and the
directory itself will be erased. The "Y" answer will only erase the files
of the highlighted directory and remove the directory if possible. By
default the ALT-W key combination is disabled. You can configure ACD to
enable this option, or use the /wipe option from the command-line.
As a safety measure, ACD cannot wipe files directly from the commandline.
Furthermore you can also Make or reName a directory when the pop-up window
is on screen by pressing ALT-M and ALT-N respectively. When ALT-S is
pressed, the highlighted directory will be (recursively) scanned for
Local database updating:
You can also use ACD to create and remove directory information only by
using the /local switch. ACD will NOT create or delete the directory
specified, but only update the ACD.IDX database.
For example, to remove the information on a directory and its
subdirectories on drive G:
C:\> ACD rd G:\users\mally /local
Then all information about g:\users\mally is deleted from the database, and
all of its subdirectories. This is especially handy for users of network
drives, who do not want this information in their database. You can also
use the ALT-R combination in the pop-up window to remove the highlighted
path and all of its subdirectories locally, by answering the question
Also, you can add local directory information to the database. Eg. if the
directory c:\bin\testcase is missing in the database info, and you wish to
include it, you can update the database with this database information
C:\> ACD md c:\bin\testcase /local
Note however that in order for ACD to update the database, the directory
c:\bin (the parent) should exist.
Probably an easier method is to call ACD, highlight the C:\BIN directory
and press ALT-S: missing drive information will be added.
You can also use ACD to give a directory another name. ACD will directly
rename the directory and update the ACD-database. Directories can only be
renamed if the parents of the directory to be renamed are the same as the
parents of the new directory specification. For example:
ACD ren c:\bin\dos c:\bin\olddos
is allowed, whereas
ACD ren c:\bin\dos c:\olddos
is not allowed, since they have different parents. You can also rename the
current directory by specifying
ACD ren . olddos
You can also use the ALT-N key combination in the popup window.
Printing a tree:
When you have a selection of the ACD database on screen you can print this
selection to a file or to a printer by pressing ALT-P. This question will
appear on screen:
Print tree to: prn....................................
You can fill in a filename or PRN (or LPT1/LPT2) for the printer. The output
on file/printer will depend on the current selections you have made:
graphical display of the paths or not, partial match or not, scrollback
history or not, etc.
The ACD and ACD_color environment variables
If you'd rather have ACD keep its ACD.IDX database another place than the
root directory of drive C:, you can specify the filename you want in the
environment variable named ACD. For example, if you'd like to keep the
ACD.IDX file on drive D: in your UTILS directory, you would put
in your AUTOEXEC.BAT file.
Furthermore, you can add the options to the environment variable: for
example, if by the default configured /C value is zero, and the /0
would set the default options to "current drive", and if the commandline
(except for options) is empty, the default commandline will be '*'. Of
course both options and a different path for the ACD.IDX can be specified
in this environment variable.
Note that the switches are real toggles, that is, if you have defined the
ACD environment variable as above, then by calling ACD /c/c all the drives
will be considered again. You may toggle as much as you like...
From version 2.10 you can overrule the toggling by adding a digit to the
switches, e.g. /c1. Then the fixed value 1 (=ON) will be used.
You can also use ACD_CFG to set your preferred defaults.
You can change the colors of the pop-up window. You do this by setting an
environment variable named "ACD_COLOR", or use ACD_CFG to make permanent
Set ACD_Color = backgroundcolor foregroundcolor
The colors can be chosen from the table below (default is: 0 7)
(Foreground & Light Colors
Black 0 DarkGray 8
Blue 1 LightBlue 9
Green 2 LightGreen 10
Cyan 3 LightCyan 11
Red 4 LightRed 12
Magenta 5 LightMagenta 13
Brown 6 Yellow 14
LightGray 7 White 15
Set ACD_Color = 2 4
Would give you red characters in a green window. The default, lightgray
characters on black background works nicely on a monochrome monitor.
NOTE: Since version 2.10 you can also use the configuration utility ACD_CFG
to set the colors you prefer, and also all switches.
Some more examples:
ACD rd . : Remove current directory.
ACD rd . /local : Remove information only on current directory.
ACD cd .... : Just like in 4DOS: go 3 directories back.
ACD d:* : Show all paths in the database on drive D.
ACD s* : Find all paths that start with s; equal to ACD s.
ACD s\ : Find all paths that start with s and show all its
ACD *in : Find all paths that have the word "in" in them.
ACD * : Show all paths in the database.
ACD ** : Show all paths in the database, and use different Speed
ACD =s : Find all paths in the scrollback history that start with
ACD /qrecreate : Create a new ACD.IDX, using information on the drives
named in the current ACD.IDX file and use the fast
All patches can now be made with the configuration program ACD_CFG.
This program searches the current directory and the PATH for ACD.EXE.
A configuration menu appears on the screen; please read the information on
the switches to understand the meaning of all possible patches.
One possible patch using ACD_CFG will be discussed below: execute program
Below are some examples for letting ALT-E execute a program or command
from the ACD popup-window. The highlighted directoryname can be included in
the parameters, by specifying %dir% in the "parameterpatch".
If you want to get a directory of all files in the highlighted directory
using ALT-E: give as program Name
"COMMAND.COM" (the extension .COM is important!)
Or, if you are using 4DOS, give:
.... and let command.com/4dos.com show all files in this directory!
By giving as parameters:
"/c dir %dir% "
So, the complete command is:
COMMAND.COM /C DIR %dir%
4DOS.COM /C DIR %dir%
As said above, %dir% has a special meaning: use currently highlighted
directory as parameter. E.g. if the highlighted line is currently
"c:\archives\temp", then ALT-E executes the command
COMMAND.COM /C DIR C:\ARCHIVES\TEMP
which gives a dir of this directory!
Note: when using 4DOS a nicer command is:
4DOS /C *DIR %dir% | *LIST /S
To call Directory Freedom (the default value), or 4FILES, you can enter
"DF" or "4F" as program name, and "%dir%" as parameters
So, the complete command is:
DF.COM %dir% or 4F.COM %dir%
It is assumed that the program names (e.g. COMMAND.COM and DF.COM) can
be found in the PATH statement; otherwise, nothing happens.
Calling ACD from another program:
Starting from version 2.20 ACD can be called from another program and give
return the chosen path in a string. The address of the string has to be
given to ACD by using the /X option. The stringsize must at least be of
length 66, or, in other words, must be able to contain at least 67 bytes.
The first three characters of the string itself must contain "ACD" when
calling ACD. Note that since ACD is programmed in Turbo Pascal, that the
"pascal definition" of a string is used. So, if you use C to call ACD, you
must know how a Pascal string is defined: the first byte of the string
indicates the length of the string. For example the string "ACD" in Pascal,
can be defined in C as: "\3ACD\0", so PASCAL recognizes it. ACD returns a
"normal" pascal string, but included at the end for convenience of C
programmers a \0. Suppose the chosen path is "C:\BIN", then in C the string
"\6C:\BIN\0" is returned, while in Pascal "C:\BIN" is returned.
The string "ACD" can have some more switches:
/wx , x >= 1 : Windowsize of x.
/rx , x >= 1 : eRror-message at line x.
/b : show window at Bottom of screen
/c : show window at Center of screen
/t : show window at Top of screen (except 2 lines)
The FIRST parameter with which ACD has to be called is the /X option,
followed with the memoryaddress of string (in decimal). ACD returns the
chosen path or "FAILED" in this string. If the address is incorrect (checked
with the first 3 characters "ACD"), then the selection is NOT returned.
For further details see the example program TEST_ACD.PAS.
Appendix - Limitations and other features:
. The ACD-database can have a maximum size of approximately 64K bytes. One
directory entry takes room for at least 5 bytes, and at most 16 bytes. If
we assume that the mean value is about 9 bytes (i.e. on average the length
of a directory-name is 5 characters), then about 7300 directories can be
. If you have more than 64K-32 bytes of directory information, ACD will abort
and save the ACD-database up to that point.
. ACD is still rather primitive on wildcards: it acts almost like plain DOS.
ACD only understands the asterisk ('*' - multiple characters match) on the
first or last position and the questionmark ('?' - one character match) on
. ACD is DesqView aware. If DesqView is active, then for simple screen
writes, it uses the BIOS and for intensive screenwrites, it uses the
Virtual Screen Buffer of DV. Furthermore, - more important - the pop-up
window correctly pops-down, i.e. the DV-screen is correctly restored.
. The directories will be presented alphabetically sorted, where the drive
order is dependent on how you created the ACD-database. If you
ACD /CREATE DCF
then first the matching files on drive D will be listed, then the ones on
drive C and then on drive F. Note that this is a feature.
. When drives do not exist anymore, for example when the network is not
loaded, the directories of these invalid drives are excluded from the
partial match list, except if the /i option is set OFF.
. Because of its database format, ACD cannot store a child directory in the
database if its parent is not there. Some people may regard this as a
feature, others as a limitation. For example, if you do this (with no
'aliases' on MD):
ACD rd C:\Useless /local
ACD md C:\Useless\Junk
ACD will create the directory "Junk", but it will not store the name in the
database, except if the /u switch value is larger than 2. You won't be
notified; the reason for this is that I don't like to be notified all the
. You might want to check all the patches you have made. By entering ACD /?
you get a help screen where the switches are indicated by OFF (0) or ON (1).
. Note that starting from version 2.00 all switches can be set by the
environment variable ACD; from version 2.10 all preferred values can be
configured by using ACD_CFG.
. ACD returns detailed ERRORLEVEL conditions, which can be useful if ACD is
invoked from batch files. The errorlevels are (NOTE: they have changed in
0 : ACD was successful
1 : No parameters on commandline
2 : Unknown command
3 : Unable to change to directory (directory not found)
4 : ACD-database is full; partial directory-info saved
5 : Unable to create directory
6 : Unable to remove directory
7 : Escape pressed
8 : ACD-database is corrupted
9 : Error opening ACD-database
10 : Error reading ACD-database
11 : Error writing ACD-database
12 : ACD_color specification is incorrect
13 : Unable to rename directory
14 : File to be renamed is NOT a directory; not renamed.
15 : Directories must have equal parent for rename
16 : Not enough memory
17 : Read-only (or: write-protected) ACD.IDX.
The resulting error message can be redirected by adding >NUL to the
. For the interested user, here is what ACD does when changing to a
1. Try to change directly from current directory to the directory
specified. If this directory does not exist, go to step 2.
2. Look for a match of the last part of the directory entry. For
example, if you specify "ACD sou", then all of the following would
If more than one match found, display the pop-up window. If none
found, go to step 3.
3. At this point, ACD just shrinks the partial string and repeats step
2, until one or more directories are found.
This last step can be disabled by setting the /s switch to OFF (/s0).
This program is FREE of charge and may be used by anyone who wishes to. So,
also in a commercial/educational environment. However, you are not allowed to
remove the Copyright Statement, or to sell this program, or bundle it with
other (commercial) goods. You may give it to anyone you like, but only in its
original form with the complete documentation.
If you have any (positive/negative) comments or suggestions, I would like to
hear from you.
Furthermore, I will not be held liable for any misfortune that may or may not
happen to you, which may or may not be the result of using or not using this
program. In other words, the usual disclaimer applies here.
2111 VN Aerdenhout
Internet: [email protected]
Fax : +31 23 248716
David E. Jenkins ([email protected]) has given me numerous useful
suggestions, like the scrollback history function, and both he and Jurgen A.
Doornik ([email protected]), author of PATCH22 and HPP, tested and commented
the Beta-release of ACD version 1.10.
Duncan Murdoch ([email protected]) has given me numerous useful
suggestions and tested the Beta-release of ACD version 2.00.
Many improvements are also due to suggestions of users like you. Without this
feedback ACD would never have evolved to what it is now. Thanks for your
Plans for a future release:
- more novell-support: using "truename" (e.g. WHV\SYS:) instead of
drive-name (e.g., G:)
- Graft and Prune..... [maybe, on the long term...]
Other software which can be freely used:
amSpell - Checks and automatically corrects your ASCII or TeX text files.
Offers alternatives for unknown words and can learn new words.
Tools for creating/editing dictionaries are included.
Current version AMSPEL20.ZIP - date August 1, 1992
version 2.33, Sept. 26, 1994
- fixed small bug concerning "ACD RD" called from the commandline on a
version 2.32, Aug. 6, 1994
- Better deduction of overlap in network mappings which will by default not
be included in ACD.IDX.
- Added possibility to let "-" be the switch-character in stead of "/"; this
will also make "/" be a directory-separator. Use ACD_CFG to configure.
- added /rx option (line to put errormessage) for calling ACD from within
version 2.31, May 26, 1994 (not officially released)
- made popup window one character wider.
- two line output when scanning drives (was one line).
- fixed bug which resulted in run-time error because too little memory was
reserved by ACD and memory was not properly "disposed".
version 2.30, January 1, 1994
- added configuration possibility [ACD_CFG] for preferred searchmethod.
A * on the command-line now toggles partial name search method.
- ALT-R and RD-command now remove all empty directories recursively.
- fixed bug concerning changing directory of substed drives
- added ALT-W option: WIPE directory, including files. This option is
disabled by default. By using /wipe or ACD_CFG it can be enabled. As a
safety measure, ACD cannot wipe files directly from the commandline.
version 2.21b, November 10, 1993
- fixed small bug in ACD_CFG: for external commands (ALT-E) you could only
specify eight characters (should be twelve).
version 2.21, May 23, 1993
- changed mail and email address
- better recognition of subsets of previously included Novell mappings.
MAP ROOT G:=WHV\SYS:
MAP ROOT H:=WHV\SYS:USERS\MERCKENS
then ACD /SCAN will only include information on G: (WHV\SYS:) and ACD will
use this information to display information on drive H:
version 2.20, March 1, 1993
- the patch-files (*.P22) are not included anymore.
- fixed bug: renaming a directory sometimes resulted in an incorrect
'scrollback history', and in a corrupt ACD.IDX.
- added memory support when calling ACD from another program: /x option.
- extended the /c option: 0 = display all drives, 1=display current drive,
2 = display current drive if it is removable (new default).
- added removable media support.
- ACD can now also handle a read-only (or: write-protected) ACD.IDX.
added errorlevel 17 to indicate this has happened.
- fixed bug: if a drive contained no directories but the root directory,
the drive would not be included in the ACD.IDX file.
- added ^X (equals ArrowUp) and ^E (equals ArrowDown).
- /reverse : use "reversed" colors.
- added /w option:
0 = jump to directory as soon as one possible directory remains
1 = if menu pops-up: wait until enter or a menuchoice (capital character)
has been given.
- extended the /s option:
0 = do not shrink searchstring
1 = shrink searchstring
2 = shrink searchstring, but always show popup when it is shrunk (new)
- fixed bug: now ACD correctly remembers history of substed drives
version 2.10, Aug. 1, 1992
- added a configuration program for ACD; the patch-files (*.P22) are now
obsolete, but included for completeness.
- the switches can be set without toggling, by adding a digit; 0 means OFF,
1 means ON. E.g. the /c toggle can be set to be ON by /c1, independent of
the previous value. The toggle method still works however.
- added ACD /[q]recreate, which re-creates the ACD database based on all
drives mentioned in the ACD database.
- scanning from the pop-up window now ensures that the information of
unknown directories is removed from the ACD database.
- speeded up scanning from popup-window.
- changed "add unknown directories" option: specifying /u[x], or the /u
switch x times, with x=
0: (/u0) do not add unknown directories to ACD database
1: (/u1) add when parent is in the ACD database
2: (/u2) add when parent is in the ACD database, and add also all
3: (/u3) if parent is NOT in the ACD database, go back until parent is
in ACD database; scan for directories starting from this directory.
4: (/u4) rescan complete drive (if this drive is in the ACD database)
- ACD now recognizes substituted drives (using SUBST or ASSIGN) and network
drives. If D: is a substed drive of C:\PROGS, you now no longer need to
scan D:, as ACD will use the information of the C: drive (in particular
C:\PROGS). Even if you create, rename or remove directories using the
substituted drive, the ACD.IDX file will be properly updated. ACD will
only show the information on the substituted drives if you explicitly give
the drive on the commandline, or use the /c option.
Because ACD now recognizes these substitutions, ACD /create (or /add, etc)
will not scan the directories of substed or assigned drives, nor will it
scan double network drive information, unless explicitly specified on the
- Added possibility to call an External program using ALT-E, for example
COMMAND.COM, DF.com or 4FILES.com; see patches on how to proceed.
- Changed errorlevel-codes on a special request of the author of 4FILES.
- Because a dash could also be a switch character (undocumented), changing
to directories containing a dash did not work properly. Fixed.
- ACD == and ACD = would not work when /s option was specified.
- ACD now follows the /0 switch applied to this drive, instead of
changing to the root directory of .
version 2.01, Jan. 12, 1992
- changed ALT-S function to allow for recursive scan.
- added ACD == for toggling to previous directory.
- added ACD = for jumping to previous directory.
- added /e - Exact match toggle: switch to directory if exactly one
directory name is found in the ACD database with this exact name.
- added /s - Shrink speedstring toggle: ACD does not try to guess what is
meant if no match: step 3. in the appendix is skipped.
- added ALT-P for Printing tree to file/prn when in pop-up window.
- fixed bug which made displaying tree slow in some cases.
- changed cursor-left to be more logical.
- added SHIFT cursor up, SHIFT cursor down.
version 2.00, Nov. 21, 1991
- added menu (and corresponding /m option) for even faster selection of
directories in the pop-up window.
- possibility to specify default options in the environment variable ACD.
- added ALT-M for Making new directories when in pop-up window.
- added ALT-N for reNaming directories when in pop-up window.
- added ALT-R for Removing directories (locally) when in pop-up window.
- added ALT-L for toggling method of highlighting current selection.
- added /l option for toggling method of highlighting current selection.
- added ? as wildcard, like in DOS.
- previously, the videomode was automatically reset to textmode 3 (if
unequal to 0/1/2/3/7; due to TurboPascal 6.0), now the current videomode
is kept. The maximumsize of the pop-up window is dependent on the
row-maximum of the videomode. Note however that ACD is unable to correctly
display the pop-up window when a graphics mode is used.
- fixed problem due to any graphics program using HERC.BGI under Desqview.
- added Ctrl Arrow-Left for going to parent of currently highlighted path.
- added Arrow-Right/Arrow-Left to equal function of TAB/BACKTAB.
- added = for toggling scrollback history function in pop-up window.
- scrollback history function can also be called by ACD = instead of ACD ! .
- added ALT-T for displaying highlighted path on top of screen.
- added ALT-G for toggling "graphic" display.
- added "graphic" for displaying paths; see also new /g option.
- added /u and /0 options, so patches are not necessary when using ACD in an
alias; when /0 is specified twice, then the scrollback history will be
version 1.14, Oct. 20, 1991
- fixed bug caused by too fast implementation of the /c option: ACD could
not recognize /create.
- added help from the pop-up window.
- /c and /i really toggle: when specified more than once, the toggling
on/off continues. Ideal for making /c the default in an alias.
- fixed small bug concerning HOME-key.
version 1.13, Oct. 15, 1991
- added /c option to use current drive for switching.
- added action of the : key when in pop-up window; all drives are selected.
version 1.12, Oct. 12, 1991
- added /i option to ignore unlogged drives; a patch can make this the
default. Saves (some) time.
- renames directories perfectly under NOVELL (NCD can't; LCD partly).
version 1.11, Oct. 6, 1991
- automatically adds newly unknown subdirectories with known parents; a
patch can disable this automatic function.
- fixed some bugs resulting in a corrupted ACD.IDX.
version 1.10, Oct. 1, 1991
- added \-function to display all subdirectories of partial match selection.
- added scrollback history function; a function to remember and pop-up the
last "historysize" (default: 20) directory-names (acd !).
- hidden directories are now also scanned.
- added ALT-C : center choice.
- added BackTab-function for selecting previous directory with same parent.
version 1.03, Sept. 14, 1991
- added possibility to patch function of calling ACD without parameters.
- if adding information with /[q]add that already exists in the information
database, the redundant information is removed. The replaced/added drive
information is put at the end of the database.
- position the highlight on the current directory if it is included in the
partial match set being displayed (sort of like "you are here").
- when drives do not exist anymore, for example when the network is not
loaded, the directories of these invalid drives are excluded from the
partial match list.
- fixed bugs:
. when removing a directory which had in the ACD database still some
subdirectories, the ACD database would get corrupted.
. when creating a new directory in the root, the ACD database would
version 1.02, Sept. 7, 1991
- changed REN function to work as in (4)DOS. Example:
ACD ren d:\bin\dos olddos
now renames d:\bin\dos in d:\bin\olddos in stead of giving an error
message. However, if you enter ACD ren d:\bin\dos d:\olddos, you'll still
get an error message and ERRORLEVEL 15 will be set.
- Some minor code changes.
version 1.01, Aug. 8, 1991
- added TAB-function for selecting next directory with same parent.
- some minor bugs fixed:
. in some instances when creating a directory, the sort order was not kept.
. when a subdirectory was created which had the same name as a 'sibling' of
the parent, the ACD-database would not be updated.
version 1.0 , Aug. 7, 1991
- first public release.