Dec 282017
Excellent change directory program for Novell lans.
File CDN.ZIP from The Programmer’s Corner in
Category Network Files
Excellent change directory program for Novell lans.
File Name File Size Zip Size Zip Type
CDN.COM 12128 6040 deflated
CDN.DOC 35554 11551 deflated
CDNMEM.COM 1162 739 deflated
CDN_READ.ME 604 368 deflated

Download File CDN.ZIP Here

Contents of the CDN.DOC file


Automatic drive mapping for your Novell network

Copyright (C) by Barry Brevik 1993, all rights reserved
711 Calle Cardo
Thousand Oaks, CA 91360
CIS 70132,2277

Novell and NetWare are registered trademarks of Novell, Inc.
Microsoft is a registered trademark and Windows is a trademark of
Microsoft Corporation.
CDn is not in the public domain- see SHAREWARE NOTICE below.

This user's guide dated September 25, 1993

Maybe you are a network user who is tired of dealing with the
hassles of network drive mapping, or perhaps you are a network
supervisor who is astounded by the number and variety of problems
related to improper drive mapping. CDn takes a concept that should
be simple and makes it simple again. CDn is a Novell NetWare
specific application that makes it easy for anyone to automatically
map and de-map network drives from inside a batch file or from the
command line. One of CDn's unique features is that it will not
only find the next available drive letter automatically, but it
will map your target path to it and then take you there!

To install CDn, copy it to a drive and directory that will always
be in your path. On my network I placed it in the SYS:PUBLIC
directory which makes it available to all workstations that are
logged in. I also placed it on all machines that have a local hard
disk in the C:\DOS directory which makes it accessible before
logging in.

All of CDn's functions are detailed in this document, but you can
get started right away by reading the short command summary and
examples below. CDn's strong point is it's simplicity- users have
been known to find it addicting.

CDn's purpose in life is to map network drives easily, efficiently
and quietly, so think of a network path you would like to visit and
let CDn take you there. Type your target destination on the
command line in "VOLUME:PATH" or "FILESERVER/VOLUME:PATH" format.
Don't worry about drive letters- CDn will automatically select the
first available drive. So, try these examples substituting your
own target paths...

cdn sys:home\jeff\backup Makes that path current on the
default file server.
cdn phantom/sys:apps Now add a specific file server.
page 1

cdn fs1/william Let's go to a specific user's mail
directory on a specific file server.

Note that by default, CDn will try to re-map an existing drive that
is already mapped to the target volume. In other words, if there
is a drive G: mapped as


and you enter

cdn sys:public\mail

then CDn will re-map drive G: as "sys:public\mail". You can force
CDn to map an unused drive letter by using the "-N" switch (see
COMMAND LINE OPTIONS below). This feature prevents you from
quickly depleting the supply of drive letters. Also, if there is
no drive currently mapped to the target volume, CDn will use a new
drive letter automatically, even without the "-N" switch. CDn
works across all file servers you are attached to if you prefix
your target path with a file server name. In the following
examples, statements following ";" characters are comments for the
examples only- you cannot put comments in a real batch file using
this method. Now, on to some specific examples.

You have probably noticed that as you move from machine to machine,
the login drive changes, or if you login on drive F: then map a
bunch of drives and end up logging out on drive H:, your login
drive is no longer F:- it has become H: and F: is now invalid.
You can use one of CDn's special command line switches to handle
this situation. Just enter "CDn -L" and you will always land in
the login directory whether you are already logged in or not. Here
is an example of a batch file that will put you or your users into
a tight login loop:

@ echo off
cdn -l ; find LOGIN drive and dir.
login ; execute the LOGIN program.
if errorlevel 1 goto lerror ; if LOGIN failed...
cdn -s ; check LOGIN status.
if errorlevel 1 goto top ; if not logged, start over.
who ; show version status and
pause ; capture status.
cdn -sh ; show drive maps.
goto end ; exit this batch.

:lerror ; if here, we failed to LOG IN.
pause ; pause to see error message.
goto top ; start over.

page 2

Note how we use "cdn -s" to determine if we have successfully
logged in. We don't really want to change to SYS:SYSTEM but
knowing that CDn will return a non-zero errorlevel if we are not
logged in allows us to use this utility for an extra purpose.

An easy way to view or edit your login script without using SYSCON
is to change to your SYS:MAIL directory and look at the file called
LOGIN. Unfortunately, the mail directories are all named with your
user id, something like "SYS:MAIL\160FD7". If you enter a single
word which is a user name on the command line, CDn will scan the
file server's Bindery and evaluate the user name to that user's
mail directory. For example, the command-

cdn william

will map a drive letter to William's mail directory and take you
there. You can also prefix your user name with a file server name
like this-

cdn phantom/william

Let's say you have an application that requires some data to be
downloaded or translated before you start it up. You know the file
server, volume and path you want to process the data in, but on any
given machine, the actual drive letter is any body's guess. Let us
further suppose that you want to create a batch file to make it
easy for the average user to start up this application and you
would like to have that same batch file work on any machine in the
company. You COULD create a batch file that maps a specific drive
letter such as M: and then map/deletes the drive when done. Of
course, if drive M: is already in use then re-mapping it would
destroy the context of the current configuration. CDn lets you
leave the current drive maps undisturbed. In this example, we go
to some specific directory and download a file called
"OURDATA.DAT", then fire up a database application to process the
results. Far from being hypothetical, there are several batch
processes similar to this being run on my network daily.

cdn -c ; clears the resident buffer
cdn accounting:accdata -n ; maps new drive
cdn sys:public\dblogin -n ; maps new drive
xbase xlat
cdn -r ; removes both new drives

That's it! In this example, we have mapped two previously unused
drive letters and then automatically removed them when finished.
This prevents the buildup of drive maps you are no longer using.
Note that CDnMEM must be loaded to use the "-c" and "-r" switch-

page 3

Many times, it is important to know that you are attached to
certain file servers before starting up an application to avoid

"file not found" and other similar errors. You can use CDn in your
batch to confirm that you are indeed attached to the file servers
you require. In this example, we skip from file server to file
server checking our status as we go...

cdn -c
cdn ojai/sys:
if errorlevel 1 goto error
cdn ventura/sys:
if errorlevel 1 goto error
cdn goleta/sys:
if errorlevel 1 goto error

xBASE myapp
goto end

echo Must be attached to servers OJAI, VENTURA and GOLETA.
cdn -r

With a little imagination, CDn can be used to automate all sorts of
tasks on your network.

If you are using CDn in a multiple file server environment, you can
add the file server name to the target path like this:

cdn fs2/sys:\public\messages

Just as with the MAP command, you must be attached to the target
file server before you can map any drives to it. If you are not
attached, map will stop and ask for a login name and password. In
contrast, CDn was designed to operate in batch files and will
terminate with an error code if you are not attached to the target
server. Also note that CDn understands MS-NET style network path
syntax. All of the following examples mean the same thing to CDn:

cdn fs1/sys:mail
cdn fs1\sys:mail
cdn \\fs1\sys\mail

Other than a network path or user name, CDn also responds to the
following switches. These switches should appear by themselves on
the command line- in other words, adding these switches to a
network path would be an invalid command.

page 4

-L Changes to SYS:LOGIN on default file server.
-P Changes to SYS:PUBLIC on default file server.
-S Changes to SYS:SYSTEM on default file server.
-SH SHows current network drive map list.
-Dx Deletes a drive mapping where x is the drive letter.

If CDnMEM is loaded...
-C Clears the memory resident new drive list without deleting any
drive mappings.
-R Removes all entries in the memory resident drive buffer and
deletes the corresponding drive mappings.

One important switch works in combination with any other command
line option. The "-N" switch forces CDn to map a NEW drive even if
there is a drive already mapped to your target volume.

You might ask "what if I delete the current drive?". If you are
running a batch file, you have no way of determining if you are
deleting the current drive, so what happens? Nothing; the NetWare
shell just makes another drive current, usually a local drive. In
any case, you don't have to worry about being bumped to another
drive after deleting a map because CDn can always take you to a
known location.

CDn coexists peacefully with the NetWare MAP command. Any drives
created with the MAP command can be remapped or deleted with CDn
and any drives created by CDn can be remapped or deleted with the
MAP command. If you are using the CDnMEM resident buffer, any
drives deleted by MAP are automatically removed from the buffer
while drives created by MAP are NOT automatically added to the

CDn comes with a companion utility, CDnMEM.COM. This is an
extremely benign and well behaved TSR that uses only 256 bytes of
RAM when resident. CDnMEM does not grab any interrupt vectors,
does not "pop-up" or in any other way interact with the system.
The sole purpose of CDnMEM is to "remember" new drives that are
created by CDn. Whenever CDn creates a NEW drive letter, it adds
that drive to the resident buffer. CDnMEM is easy to install-

cdnmem /i

typed on the command line or added to your AUTOEXEC.BAT file will
do the trick. Because it is so unobtrusive, CDnMEM can be
uninstalled at any time by typing:

cdnmem /u

even if other TSR's have been loaded on top of it. You can even
install CDnMEM at the beginning of a batch file, use CDn to map and

page 5

remove drive letters, and then uninstall it as you exit the batch
file. CDnMEM will not install another copy of itself if it has
already been loaded.

When CDnMEM is installed, there are two additional switches
available to CDn-

The "-r" switch will remove (un-map) any drive mappings that are
retained in the resident buffer.

The "-c" switch will clear any drives in the resident buffer- in
other words, it will reset the buffer to blanks but it will not un-
map any of the drives. This is useful when you want to create and
delete drive mappings in a batch file and you want to be sure you
are starting with a blank slate. Just add this line to the start
of your batch file.

cdn -c

CDnMEM can be "loaded high" if your DOS version or third party
memory manager (such as QEMM) supports a loadhi function. See your
DOS manual or memory manager documentation for an explanation of
how to load programs high.

If you are using Microsoft Windows you can still use CDn with no
problem. By default, Windows tries to isolate tasks from each
other which results in some strange behavior- if you create a new
drive with CDn or MAP in a DOS box, that drive will not be
available to any other Windows tasks, and when you quit Windows,
any drives you created will have disappeared. Sometimes, this
might seem like a nice feature, but if you do want to share your
drive maps across Windows tasks, you can change the default by
editing your SYSTEM.INI file. You can easily edit this file by
clicking on FILE/RUN from Program Manager, type SYSEDIT on the
command line, and click OK. Four cascaded windows will appear-
click on the one titled SYSTEM.INI. Search for the heading
[NetWare]. If you can not find it, just add it to the end of the
file. Add one or both of the following lines under this heading.


Add this line to share drive maps between tasks.


Add this line to retain drive maps you have created or deleted when
you leave Windows.

If you use CDnMEM, you should load it before starting up Windows.
Since you can only load one copy of CDnMEM, trying to load it
repeatedly from multiple DOS sessions will fail. When you use
CDnMEM from a DOS session, also note that all DOS windows share the

page 6

same resident buffer, so if you add drive G: (for example) from DOS
session 1, it will appear in the resident buffer of DOS session 2
even if drive G: does not exist in that session. This is not
necessarily a problem, but you should be aware of this behavior on
the off chance that you will run more than 1 batch file that
creates and deletes drives in simultaneous DOS sessions.

You can use CDn in NetWare login scripts. Just add a line to your
login script like this (for example):

#sys:public\cdn sys:\

There is no compelling reason to do this and one reason not to do
it. If you replace all of your "MAP *1:=SYS:\" lines with

"#CDN..." commands, LOGIN.EXE somehow reserves that first drive and
you end up with one drive (the first one) that remains mapped to
SYS:LOGIN with a fake root.

CDn has several added features that are not essential to it's
functionality, but helpful when you use CDn on a regular basis.

You can delete a specific drive mapping without using the MAP
command like this:

cdn -dk

This command will delete the mapping for drive K: (the ":" is

You can view your current drive mappings by entering:

cdn or cdn -sh

This is like typing "map" except the output is trimmed to show only
network drives. If you have a busy PATH set up, this can be a nice
feature. Any drives with a fake root mapping will have the message
"[fake root]" appended. Additionally, if CDnMEM is loaded and it
contains any drive letters, a message will appear showing what
drives are currently in the buffer. This is also a handy way to
check your login status- when I want to see if I am logged in, I
also want to see where my drives are mapped. Generally, if you see
only one drive mapped and it points to SYS:LOGIN, then you are not
logged in to a file server.

page 7

Three switches, "-P", "-S" and "-L" will take you to the
SYS:\PUBLIC, SYS:\SYSTEM or SYS:\LOGIN directories on the current
file server. Note that you cannot specify a target file server for
these special options- CDn will always use the default file server
with these switches.

You can use the "/" or the "-" character when specifying command
line options. Also, command line options can be upper case, lower
case or mixed.

CDn also handles relative paths and paths with drive letters just
like the "CD" command. CDn however, will change both the drive and
the path at the same time. These are all valid CDn commands
(provided the drives and paths exist):

cdn c:\windows
cdn ..\..\users
cdn .\develop\source
cdn \windows\system

Note that the relative path format "cdn windows" is not supported-
if a path does not start with a file server name, volume name,
drive letter, ".", or "\" CDn assumes you are asking for a user's
mail directory.

The display output of CDn can be routed to a text file or printer
using standard DOS redirection like this:

cdn sys:home\mary > maps.txt

You can not use CDn to map a SEARCH drive. This feature will be
available in version 2.0 (see "THINGS TO COME" below).

You can not use CDn to "map root" a drive.

You can not map a specific drive letter- use the MAP command for
this purpose (example "map g:=fs1/sys:\public").

In normal use, CDn displays very few informational messages. If an
error occurs, however, there are a number of error messages that
may be displayed. All error messages also result in a non zero DOS
errorlevel return inside a batch file. The following is a list of
possible messages.

page 8

New drive mapped as X:
Any time CDn maps a previously unused drive letter this message
will be displayed replacing "X" with the actual drive letter.

The mapping for drive X: has been deleted.
Any time you delete a drive map with the "-d" or the "-r" switch
this message will be displayed replacing "X" with the actual
drive letter.

Resident buffer has not been loaded.
Resident buffer was empty- no drive mappings have been deleted.
Resident buffer was already clear.
Resident buffer has been cleared only- no drive mappings have been
These messages will appear when you invoke CDn with the "-r" or
the "-c" switch and the CDnMEM buffer is either not loaded or is

User not logged in.
Specified path is invalid.
NetWare shell is not loaded.
Specified volume is invalid - volume names have a maximum of 16
Specified volume does not exist.
Specified file server is invalid.
You are not attached to known file server FS2
Cannot map NEW drive... all permanent drives are currently mapped.
Cannot map SYS: volume... all available drives are mapped either
as SEARCH drives, or to a volume other than SYS:.
Cannot map target volume... all available drives are mapped either
as SEARCH drives, or to a volume other than the target.
No such user in Bindery - JAMES
User does not have a mail directory - JAMES
drive is not in the range "A-Z".
drive is not a network drive.
drive is a SEARCH drive.

With the exception of the "NetWare shell not loaded" message, I
have never seen these messages except under simulated error

Must be running NetWare v2.10 or better.
Must have NetWare shell v3.01 or better.
Insufficient memory to run.
Existing network drive found, but CDn could not make that drive
Unable to map drive X:
Cannot delete mapping for drive J:...
You are connected, but not attached to the specified file server.
Specified drive does not exist.
Could not allocate space in resident memory buffer.
page 9

CDn has been tested extensively on a NetWare v2.15 dual file server
system- this is a 35 user production network on which CDn has been
in daily use for about six months at the time of this writing. CDn
has also had limited testing under NetWare 2.2, 3.11 and 4.01. CDn
has been tested under several workstation OS versions including
MSDOS 3.3, 5.0 and 6.0. Final testing was performed by myself on
the 43 file server WAN at ABC studios in Hollywood, CA.

CDn has CTRL/C and CTRL/BREAK handlers to avoid the unpleasant
results of unexpected termination. In keeping with the intent of a
batch file utility, there are no messages which require a keystroke
to clear. Specifically, the usage message which has multiple
screens will pause for 2 seconds between screens, and will then
automatically continue. Also, the registration reminder screen
will pause for 2 seconds. The registration reminder screen does

not show every time the program is run, but is semi random. When
you register, you receive a copy of CDn without the reminder

Here is a list of the possible errorlevel return codes. Most of
the time, you will probably not need (or want) to get this detailed
in your batch file. Personally, I usually check for errorlevel = 1
which will trap them all.

1 insufficient DOS version.
2 insufficient memory.
3 syntax error (shows USAGE message).
4 NetWare shell is not loaded.
5 user is not logged.
6 insufficient NetWare OS or NetWare shell version.
7 invalid file server.
8 you are not attached to target server.
9 undefined.
10 invalid volume.
11 user has no mail directory.
12 path is invalid.
13 could not map.
14 no free drives.

To run CDn, your file server(s) and workstations must meet the
following conditions:

Workstation must be running MSDOS v3.0 or better.
NetWare shell must be v3.01 or better.
File server must be running Advanced NetWare v2.10 or better.

page 10

Version 2.0 is already under development and some of the planned
enhancements are:

Create and delete SEARCH drives automatically. CDn will handle
updating your path.

LAUNCH applications by knowing their volume:path. For example, you
can type "CDn data:word\john" to get to a data directory and then
"CDn -xsys:public\apps\wordproc" to launch an application from
where you are.

Copy files between different directories, volumes or even file
servers automatically.

CDn version 2.0 is planned for release in Jan, 1994. The only way
to receive version 2.0 is to register this version- v2.0 will not
be available on bulletin boards.

CDn is copyrighted software distributed as shareware and may be
used on a 30-day free trial basis. If at the end of 30 days you
find CDn to be useful and you wish to continue it's use, you must
register your copy based on the fee plan shown below. You do not
need to wait the full 30 days if you have made your decision and
wish to receive the distribution diskette as soon as possible.

When you register, you will receive a printed user's guide plus a
copy of the latest version of CDn on diskette. The distribution
diskette also contains a few minor networking utilities that you
may find useful.

You are permitted to make multiple copies of CDn for use within a
single business or organization up to the limit specified by the
license agreement

Shareware disk and CD-ROM vendors, user groups, computer clubs,
bulletin board systems and individuals are permitted to copy and
distribute CDn for others to try on a 30-day free trial basis,
provided that the program is unmodified and is accompanied by this
user's guide. A reasonable fee may be charged for media, copying,
and shipping and handling.

To register your copy of CDn send your name and the address where
you receive U.S. mail together with your payment and a copy of page
one of this user's guide to:

Barry Brevik
711 Calle Cardo
Thousand Oaks, CA 91360

page 11

There is no charge for shipping and handling. Please specify the
diskette size you want (5.25" or 3.5"). You may pay by cash,
check, money order, or postal money order, in U.S. dollars. Checks
and money orders must be drawn on a U.S. bank.

Registered users will receive a fresh copy of CDn that has the
registration reminder screen removed resulting in the smallest
possible on-disk size. Additionally, registered users will receive
a free upgrade to version 2.0 (see THINGS TO COME above) as soon as
it is available. Version 2.0 will not be available on bulletin

| Fee schedule |
| 1 or 2 file servers | $24.00 |
| unlimited users | |
| 3 or more file servers | $39.00 |
| unlimited users | |

Registered users of CDn are entitled to support at no additional
cost for a minimum of three months from the date of registration.
Within this time, the author, when contacted via CompuServe or U.S.
mail will answer questions regarding the use of CDn and will
attempt to correct any failure by CDn to function as described in
this user's guide. If during the three month period the problem
cannot be corrected, even if that problem is caused by an
incompatibility in the user's specific hardware or software
environment, the user may request and will receive a full refund of
the registration fee.

Comments, criticisms, and suggestions regarding the current product
and possible future enhancements to CDn are welcome. Please send
any communications to the address or CompuServe account shown at
the end of this document.

The author disclaims all warranties, expressed or implied,
including but not limited to implied warranties of merchantability
or fitness for a particular purpose, with respect to CDn, the
accompanying documentation and any other computer programs that
appear as part of the distribution package. In no event shall the
author be liable for any damages, direct or consequential,
resulting from the use, misuse or inability to use this product,
even if the author has been advised of the possibility of such

page 12

Both CDn, CDnMEM and all the programs in the distribution package
were written entirely in Assembly Language. Why? My personal
feeling is that small utilities should BE small. Although I
program in "C", xBASE and Assembly Language (MASM) in my daily
work, my favorite medium has always been MASM. MASM is great for
small projects like this, however, there is a lot going on inside
CDn- it weighs in at just a little over 4000 lines of source code!
With CDn, execution speed is not very important so I concentrated
instead on keeping the on-disk size of the utility as small as
possible, and MASM lets me keep very tight control of wasted space.
When you register, you will receive a separately assembled version
of CDn which has the registration reminder screen function removed-
this shaves approximately 2000 bytes off the disk image.

During the development of this utility, several people were very
helpful to me in offering their unselfish support, ideas and
camaraderie. I would like to thank the following individuals:

My wife, Cindy for encouragement, support and letting me work until
the wolf's hour.

Lawrence Couey of Novell Labs for pointing out in excruciating
detail my biggest mistake.

Brett Warthen of Infinite Technologies for his untiring support on
the CompuServe Netwire forums.

Steven Key of the University of Wisconsin-Whitewater for shining a
light on an area I thought was already bullet proof.

Tom Ruby of Legal File Software for giving me an important clue
if I had only been sharp enough to realize it.

William D. Cotten for giving it the critical eye.

Elaine Pate for providing a truly impressive test platform.

Greg Horton of SMTEK, INC for believing in me and allowing me to
make this utility public.

All of the sysops on the Netwire forum for making it the best
support forum in the world.

The author of CDn can be reached at:

Barry Brevik
711 Calle Cardo
Thousand Oaks, CA 91360

or on CompuServe at: CIS account 70132,2277
or on the Internet at: [email protected]

page 13
*end of file

 December 28, 2017  Add comments

Leave a Reply