Can I SUBST a network drive?

6,038

Assuming that C: is an NTFS volume, what you want is to create either an NTFS volume mount point or a junction point depending on your needs.


You can use Disk Management (diskmgmt.msc) to mount T: as a directory in C: or from the command-line (replace the GUID with the one of the target drive):

> md C:\Volumes\Test
> mountvol C:\Volumes\Test \\?\Volume{GUID}\


Alternately, you can also use mklink to create a junction point:

> mklink /j C:\Volumes\Test T:\

Since mklink is not included in Server 2003 (o.O), this shell-extension can be used to create and manage junction points.

Share:
6,038

Related videos on Youtube

Kalessin
Author by

Kalessin

Updated on September 18, 2022

Comments

  • Kalessin
    Kalessin over 1 year

    I have a network share mapped to drive T: and I want to be able to access if easily from a specific directory. However, entering subst t: c:\volumes\test gives the error message Invalid parameter - T:

    Is there a limitation on mapped network drives or Windows server 2003, or am I doing something wrong?

    Update:

    As EBGreen points out, I don't actually want to use subst, since it doesn't do what I thought it did. I'm coming from a Linux environment, where remote shares can be mounted on to a directory in the filesystem.

    Is there something in Windows that'll let me do this?

    • Harry Johnston
      Harry Johnston about 12 years
      subst does the exact opposite of what you are trying to do.
    • Kalessin
      Kalessin about 12 years
      @Harry You're right. I haven't had to use it since about 1989 and its purpose had become somewhat confused in my mind over time.
    • sean christe
      sean christe about 12 years
      In the interest of credit where credit is due, Synetech and Harry johnson had it right, I had it backwards.
    • Synetech
      Synetech about 12 years
      @EBGreen, to be fair, if Kalessin’s avatar is at all representative, then English may not be their first language. ;-)
    • sean christe
      sean christe about 12 years
      No, any confusion was certainly my fault.
    • Kalessin
      Kalessin about 12 years
      @EBGreen Given that English is my first language and I got subst usage backwards, I'll take the blame and walk away. Thanks for all your input anyway :)
  • Harry Johnston
    Harry Johnston about 12 years
    I don't think either of these will work when T is a mapped network drive. Junction points are (sadly) user-context-independent, and mapped network drives are per-user-context.
  • Synetech
    Synetech about 12 years
    I couldn’t test because I don’t have any networked drives.
  • Kalessin
    Kalessin about 12 years
    Mountvol lists possible values for the VolumeName parameter and drive T is not amongst them. I don't seem to have mklink available on my system, so I'll look into that... Edit: mklink is available only from Vista/Server 2008 onwards.
  • Synetech
    Synetech about 12 years
    @Kalessin, then Harry is correct; it does not support network drives. I would have thought that mklink would be available in Server2003 (considering it is a server edition). Well, junction points are nevertheless supported, so you can use this shell-extension (which should even make it easier to use).