Discussion Locked

Mapping a drive

0 helpful
14 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi,
I'm trying to map a drive in dos on a win98 machine.An example of the command I'm using is c:>net use q:\\(server_name)\(directory_name)... The error that I get is as follows: "the specified drive letter or device is invalid.If you specified a drive letter check the last drive command in the config.sys file to make sure the drive letter is included..I know I could map this from My computer or explorer, But I'm trying to write a batch file. Any help would be appreciated. Thank's in advance...

14 replies

by syscokid

Did you really type "net use q:\\(server_name)..."

If so, you left out a space:

net use q: \\servername\directory

by nettek

What "Kid" is trying to tell you is that you need a space between q: and \\servername\directory.

by sixfourtykilo

The first answer is correct when using the NET.EXE command. NET is used for different network functions, including logging on and mapping drive letters. for NET USE to properly work, you must assign a drive letter to the desired shared name. If you're not sure if you have any free drive letters or what the first drive letter free is, you can use the wildcard * and NET USE will automatically map your shared name to the next available drive letter. So the syntax for using NET when mapping a drive letter should be as follows:

NET USE Q: \\SERVER_NAME\SHARED_NAME

-or-

NET USE * \\SERVER_NAME\SHARED_NAME

Remember, you are MAPPING your SHARED_NAME to a drive letter (Q:), so there must be a space between the letter and the SHARED_NAME. Additionally, in most cases you cannot just map the SERVER_NAME, you must map the SHARED_NAME:

NET USE Q: \\SERVER_NAME\SHARED_NAME

640k

by sixfourtykilo

I also noticed a confusion of back-slashes (\) and forward-slashes (/) in your question. If you are having a problem with anything else, you must also remember that NT and Microsoft Networking always uses the back-slash (\).

640k

by dprivette

One other thing, if you want this to be a perminent drive mapping you will need to put (space)/p:y at the end of your mapping path.

by shmaltz

You get the error when you try to map from DOS and the Share Name and/or the server name is too long for dos. It has to be under 11 Char. to work in dos. To work around either: rename the share name or server name. Or: create an additional share on that folder with a different name (this one dosnt work for the server name).

This discussion is closed to new replies.