home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
WDR Computer Club Digital 1995 June
/
CLUB_0695.BIN
/
shareos2
/
os2comm
/
wcd.txt
< prev
next >
Wrap
Text File
|
1995-05-12
|
7KB
|
181 lines
Wolfgang's Change Directory v1.62
(c) 1994/95 by Wolfgang Sarp
All rights reserved
Released Jan 14, 1995
WCD (Wolfgang's Change Directory) is a utility that allows you to change
to a directory across all drives and without to enter the complete path-
and directory name.
WCD.CMD and WCDMAIN.EXE are used under OS/2, WCDDOS.EXE is the DOS program.
You may rename WCDDOS.EXE, e.g. to WCD.EXE, but you must not rename the
OS/2 program WCDMAIN.EXE.
Because OS/2 is restoring the environment when the program is finished
running, you have to start the main program WCDMAIN.EXE with the WCD.CMD.
Just copy WCD.CMD and WCDMAIN.EXE into a directory that is in the PATH
and you can use it everywhere on your system to change the directory to
any drive and any directory. Don't care about the WCD.CMD, it is re-written
every time by the main program. For DOS no batch file is needed.
The usage is very simple.
WCD /? or WCD /h will give you some help,
The syntax:
───────────
WCD /Scan [drivelist]
will scan all drives in the drivelist and write the directories
into the database on drive C. If [drivelist] is omitted, WCD will
scan all drives.
WCD /Update [drivelist]
will update all drives of the drivelist-parameter in the database.
The information of all other drives will remain in the database.
If [drivelist] is omitted, WCD will update all drives that are
currently in the database.
WCD /QScan [drivelist]
WCD /QUpdate [drivelist]
This will only scan directories without an extension. If you don't
have directories with extensions you might want to use this method,
it's a bit faster.
WCD /Sort
will sort the database. You can use /Sort together with /Scan
or /Update to sort the database after the scan or update.
E.g. "WCD /Scan /Sort CDE".
WCD <directory>
will change to the drive and directory that matches your parameter.
If there's more than one match, WCD will show a pop-up window and
let you select the directory.
WCD ... [....] [.....]
will go up two, three four... directory levels.
WCD md directory_name
will create a directory and update the database
WCD rd directory_name
will delete a directory and update the database
WCD ren oldname newname
will rename directory a directory and update the database
The options:
────────────
/a : list all directories.
If WCD finds more than one directory that matches exact
to your search string WCD will only list these exact
matching directories by default. Use /a if you want WCD
to list all directories that contain the search string
in their name.
/b : list only directories that begin with the searchstring.
By default WCD lists all directories that contain the
string somewhere in the name. Use /b If you want WCD to
list only directories which begin with your <directory>
parameter.
/c : don't scan CD-ROM drives.
By default WCD scans all drives. If you don't want WCD
to scan CD-ROM drives by default, use /c and WCD will not
scan a CD-ROM drive with "WCD /Scan". You have to give
the drive letter, e.g. "WCD /Scan cdfg" to make WCD scan
a CD-ROM drive when this switch is set.
This /C switch only works with the OS/2 version. Right
now I don't know how to detect a CD-ROM drive under DOS.
If somebody could supply me with some information on that,
I'd be happy.
/d : search current drive only.
Search for the directory you want to change to only on
the current drive.
/e : if only one exact match, show popup window.
Show popup window if exactly one directory name is found
in the WCD database with the exact name to search for.
/s[x] : shrink searchstring.
This option will change WCD's behaviour when no directories
are found that match the original searchstring.
0: (/s0) do not shrink searchstring, abort (default).
1: (/s1) shrink searchstring and try again.
2: (/s2) shrink searchstring and try again. Always open window,
even if only one directory matches the shrunk searchstring.
/s (without a number) is equal to /s1.
Environment variables:
──────────────────────
WCD : to set the above options as defaults.
If you want to use any of the obove options as default
you can use the the environment variable WCD.
E.g. use "SET WCD=/S1/C".
WCDDIR : set drive and directory to store the WCD database at.
By default the WCD database is placed in the root directory
of drive C:. If you prefer to place it on an other drive or
in an other directory you can do it by using the environment
variable WCDDIR. E.g. "SET WCDDIR=D:\TOOLS\WCD".
If you set WCDDIR, you have to define full drive an path, but
do not add the filename!
WCDCOL : set colors of the WCD popup window.
If you don't like the default window colors you can change
them with the environment variable WCDCOL.
E.g. "SET WCDCOL=15,1". You must use this format, 2 numbers
devided by a comma. The first number is the foreground color,
the second is the background color. Foreground colors are
accepted from 0 to 15, background colors from 0 to 7.
Important: Use uppercase letters for the SET-switches!
Using WCD with 4DOS/4OS2:
─────────────────────────
WCD is also 'ALIAS-aware'. If you're using 4DOS or 4OS2 you can create
the aliases CD, MD and RD to use WCD with a simple CD command and to
keep your database always up-to-date.
This is an example how it could be done with 4DOS:
ALIAS CD=C:\DOS\WCDDOS %1
ALIAS MD=C:\DOS\WCDDOS MD %1
ALIAS RD=C:\DOS\WCDDOS RD %1
With 4OS2 you could do it like this:
ALIAS cd=c:\os2\wcd %1
ALIAS md=c:\os2\wcdmain md %1
ALIAS rd=c:\os2\wcdmain rd %1
You can add the above commands to your AUTOEXEC.BAT or 4START.CMD or
just add the aliases to your alias-list that you read with 'ALIAS /R'.
If you have any problems, ideas or suggestions or just want to praise
me <g>, feel free to contact me. Read ORDER.WCD to get to know who to
contact me and how to register.
Have fun, take care, Cheers,
Wolfgang