Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Feb 2003
    Location
    West Hollywood, California, USA
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Assign a drive letter to a directory (XP Pro)

    I have a hobby website and a store the files for it in a folder on my Windows XP PC before I upload them to the server.

    My problem is that when I make relative file references in the HTML, I want to use the '/' to go to the root of the website which is fine once the file is on the server. However, when I preview my files on my PC, the relative file references do not work, because they go to the root of the drive rather than the folder.

    What I would like to do is map a directory on my C drive to a new letter so that I can trick the relative references to work.

    I have done Google search after Google search and I can't seem to find anything, so I must be putting in the wrong key words. I apologize in advance if this is too basic a question for this forum.

    Thanks for the help!


    -kevin

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    7,089
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Assign a drive letter to a directory (XP Pro)

    You can use the SUBST command to accomplish this. From a command prompt, type SUBST /? for the proper syntax. If you are using NTFS, you can also create a junction point, as described in article 205524. Lastly, you can share the folder and then use the NET USE command to map a drive letter to the specific share.

    HTH,
    -Mark

  3. #3
    Plutonium Lounger
    Join Date
    Oct 2001
    Location
    Lexington, Kentucky, USA
    Posts
    12,107
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Assign a drive letter to a directory (XP Pro)

    Since I already use Partition Magic, I solved that problem by creating a separate, small partition on one of my hard drives to use for "web" storage. It doesn't matter what drive letter it has, just so that all the files "start" in the root directory of this partition. All relative reference problems went away!

    (There are other partitioning products out there that will let you create new partitions on the fly, without destroying your data. If you need suggestions, post back)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •