Mapping local folder as new logical drive

Posted on 2003-03-16
Medium Priority
Last Modified: 2008-02-01

For some of my old code to work, I need a D: drive.
Unfortunately my new laptop only has one partition,
so I mapped the ABC folder on my C: drive(C:\ABC)
as a logical D: drive. My ABC folder is shared as ABC$
I am running XP.

I mapped network drive D: via explorer > tools > map network drive


This works fine, I can access that drive correctly as long as my laptop is on the LAN.
When I disconnect the laptop from te LAN, and try to access the logical D: drive
I get :

"An error occurred while reconnecting D: to \\\ABC$
Microsoft Windows Network : the local device name is already in use"

This probably has to do with my network bridge no longer being active..

I tried to solve my issue by selecting the "Make Available Offline"
option on the D: drive and synchronising, but still after disconnecting from
the LAN I get the the local device name is already in use error.

Any ideas?

Question by:2810
  • 3

Accepted Solution

joesinc earned 600 total points
ID: 8147511
Yeah, try the old fashioned method. There is a DOS command called SUBST which allows you to have a drive letter point at a folder on your hard drive.

Start Menu, Run, type in CMD and hit enter


Will do the trick. Put this in a batch file and put the batch file in the startup group.

Or put in in AUTOEXEC.NT (lives in C:\WINDOWS\SYSTEM32, or C:\WINNT\SYSTEM32)



Author Comment

ID: 8172946

sorry for the late reply, work kept me busy :->
For the extra 25, could you also give me the command to disconnect the drive.
Thanks a lot,

Expert Comment

ID: 8173009
To delete a SUBST drive, type in:


If you ever want to know syntax for any DOS command, just type in the command and a /?:


This gives the following output:

Associates a path with a drive letter.

SUBST [drive1: [drive2:]path]
SUBST drive1: /D

  drive1:        Specifies a virtual drive to which you want to assign a path.
  [drive2:]path  Specifies a physical drive and path you want to assign to
                 a virtual drive.
  /D             Deletes a substituted (virtual) drive.

Type SUBST with no parameters to display a list of current virtual drives.

Hope this helps!



Expert Comment

ID: 13512236
Hey guys-

I am trying the same thing here, only the SUBST command seems to follow the old 8.3 file names.

I am entering the command: subst x: c:\program files\test

and I get: Incorrect number of parameters - files.  
Other "shorter" directories work fine.

I am trying to automate a directory update using a batch file and the receiving directory is
nested in the "Program files" folder.

Thanks in advance,


Expert Comment

ID: 13514852
Simple, although if I were a nasty Expert I'd tell you to post your own question ;-)

A lot of dos commands cannot cope with spaces in file or folder names, so you use inverted commas to deal with the space. You typed:

 subst x: c:\program files\test

As far as the DOS command is concerned, the folder to SUBST is C:\program and you've passed files\test as another parameter.

 subst x: "c:\program files\test"

The inverted commas wrap up the whole C:\program files\test statement as one parameter. That is, SHIFT key and press number 2 (I'm assuming a UK keyboard, US keyboard it's SHIFT + apostrophe key I think). It isn't two apostrophes or anything like that.


Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you build your web application in Visual Studio you'll get at least a few binaries, or .DLL, files in your bin folder. However, there is more compiling to be done. Normally this would happen when an ASP.NET resource within the web site is request…
Migration of Exchange mailbox can be done with the ExProfre.exe tool. But at times, when the ExProfre.exe tool migrates the Exchange Server user profile, it results in numerous synchronization problems. Synchronization error messages appear in the e…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
There may be issues when you are trying to access Outlook or send & receive emails or due to Outlook crash which leads to corrupt or damaged PST file. To eliminate the corruption from your PST file, you need to repair the corrupt Outlook PST file. U…
Suggested Courses

593 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question