"Map" a drive letter to a LOCAL harddrive?

  • Thread starter Gary Richtmeyer
  • Start date
G

Gary Richtmeyer

I know that one can "map" a drive letter to a network drive&folder (I do it
all the time), but for reasons I won't go into here, I find myself needing
to "map" a drive letter to a folder on a *local* HD (e.g. define "M:" to
point to "C:\DataFolder").

I can think of all kinds of pitfalls (e.g. disk cache buffering, multiple
updates), but am wondering if anybody come across a way to do this?

-- Gary Richtmeyer
 
S

Steve Pearce

I know that one can "map" a drive letter to a network drive&folder (I do it
all the time), but for reasons I won't go into here, I find myself needing
to "map" a drive letter to a folder on a *local* HD (e.g. define "M:" to
point to "C:\DataFolder").

I can think of all kinds of pitfalls (e.g. disk cache buffering, multiple
updates), but am wondering if anybody come across a way to do this?

In a command window:

subst m: c:\DataFolder

To "unmap" the drive:

subst m: /d
 
D

David Candy

You can map local drives, just through the network.

In My Comp, Tools - Map Network Drive

and map it to yourself via the network. EG if you want to map C for admins only (cause there is a hidden share already) and your computers name is fred

\\fred\C$

You don't need a network to do this.
 
G

Gary Richtmeyer

Steve Pearce said:
In a command window:

subst m: c:\DataFolder

To "unmap" the drive:

subst m: /d

Of course (slapping self on side of head)! It's been so long since I've had
a reason to use SUBST, that I'd forgotten about it. Just tried it and it
works like champ. Thanks!

Thanks.

-- Gary Richtmeyer

p.s. M.Rajesh:
My customer has an application (Media Shout 2) that creates scripts which
"reference" various externally-stored files. Unfortunately, the script
contains the exact location of each external file. For networked PCs, the
external files are stored on the "M" drive which is mapped to the
appropriate server drive/folder.

But if a user needs to run the application standalone (e.g. when traveling),
he can copy the external files from the server to his local PC, but the
script isn't usable as-is since it says the external files are on the "M"
drive, which isn't there when standalone. Mapping "M" to the same local
drive/folder that the user placed the external files allows the application
to run. SUBST does this nicely.
 
G

Guest

You may also want to look into the SUBST command (it's been there since DOS
days) for this sort of thing. Yes, there are reasons to want to do this,
mostly to handle programs that were written with hard-wired
drive letters/paths.

|Sure you can. Just share the directory, and then go to map and select your
|own computer and the share you just created. This has worked since NT 3.1.
|Why do it? So command files can reference a common drive letter and work
|whether they are used from a remote machine or locally.
| Bob
|
|"M. Rajesh" wrote:
|
|> Hi,
|>
|> No you cannot do that. mapped drives can point to drives outside the
|> computer for eg on a network, but not on the own disk.
|>
|> that is a strange requirement to have a folder as a drive. Would u mind
|> telling why this strange requirement is needed.
|>
|> Regards
|> M. Rajesh
|> .Net and Windows Shell MVP
|> www.winxpsolution.com.
|>
|> "Gary Richtmeyer" wrote:
|>
|> > I know that one can "map" a drive letter to a network drive&folder (I do
| it
|> > all the time), but for reasons I won't go into here, I find myself needing
|
|> > to "map" a drive letter to a folder on a *local* HD (e.g. define "M:" to
|> > point to "C:\DataFolder").
|> >
|> > I can think of all kinds of pitfalls (e.g. disk cache buffering, multiple
|
|> > updates), but am wondering if anybody come across a way to do this?
|> >
|> > -- Gary Richtmeyer
|> >
|> >
|> >
 
D

David Candy

Subst is to allow Dos 1 programs to work on Dos 2 or higher. Dos 1 had no sub directories so accessed file by drive letter only. This allowed a Dos 1 program to access files in a sub folder om Dos 2 or higher (yep over 20 years ago and MS can still run Dos 1 programs).
 
F

fallenfallen46

You can map local drives, just through the network.

In My Comp, Tools - Map Network Drive

and map it to yourself via the network. EG if you want to map C for admins only (cause there is a hidden share already) and your computers name is fred

\\fred\C$

You don't need a network to do this.
 
T

Twayne

In David H. Lipman <[email protected]> typed:

....
Another idiot Google Grouper responding to an OLD post,
September 3, 2004.
Because its a Google post you can't even see who is
posting what, poperly.
However, the best answer is to use the SUBSTitute command
such as...
SUBST M: C:\DataFolder

subst /?
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.

And a known idiot "grouper" who has nothing positive to say about
anything, EVER, it seems!

That's an answer provided that didn't exist before; how do YOU
get the nerve to call them idiots? I've done that same thing
myself when I happen to come across one that remains relevant
today but there are no answers to it.
And who cares WHO it was, if the answer was accurate. I
noticed you provided your own answer to the "idiot", so you
indeed also responded to that OLD message. You're an enigma and
often oxy-moronic.

At least you did provide a soluton this time, something rare for
you to do. But you still need a LOT of work on your interpersonal
skills.

HTH,

Twayne`
 
Z

Zaphod Beeblebrox

On Wed, 16 Jan 2013 13:52:31 -0500, "Twayne"
In David H. Lipman <[email protected]> typed:

...
Another idiot Google Grouper responding to an OLD post,
September 3, 2004.
Because its a Google post you can't even see who is
posting what, poperly.
However, the best answer is to use the SUBSTitute command
such as...
SUBST M: C:\DataFolder

subst /?
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.

And a known idiot "grouper" who has nothing positive to say about
anything, EVER, it seems!

That's a bit harsh, I've seen plenty of positive and helpful posts by
David H. Lipman.
That's an answer provided that didn't exist before; how do YOU
get the nerve to call them idiots?

Perhaps you didn't notice, but unless the quoting was completely messed
up, our friend (e-mail address removed) did not actually add anything
to the discussion. The "answer provided" that you speak of was
provided by David Candy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top