Solved: If I can assign a drive letter, can I assign a folder letter?

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Jag11

Thread Starter
Joined
May 30, 2005
Messages
1,244
I'm just curious, because if we can assign a letter for a drive [for example, C:], then, can I assign a letter to a folder? Because when I save/open a file or anything like that, I can just type the letter of the drive if I want to access a drive, so I wish I could assign a letter to a folder.
 

JohnWill

Retired Moderator
Joined
Oct 19, 2002
Messages
106,418
from the command line, type:

SUBST /?

C:\>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.
 

Jag11

Thread Starter
Joined
May 30, 2005
Messages
1,244
I can't understand it, I'm sorry..

What if I want to assign X: to a folder from C:\Myfolder

What command would I type?
 

JohnWill

Retired Moderator
Joined
Oct 19, 2002
Messages
106,418
Connect the mapping: SUBST X: C:\Myfolder

To disconnect the drive/folder mapping: SUBST X: /D
 

Jag11

Thread Starter
Joined
May 30, 2005
Messages
1,244
C:\Documents and Settings\MY_USER>subst X: C:\Myfolder
Incorrect number of parameters - files\windows\local

C:\Documents and Settings\MY_USER>
 

Jag11

Thread Starter
Joined
May 30, 2005
Messages
1,244
C:\Documents and Settings\MY_USER>subst X: C:\Myfolder\NEW folder
Incorrect number of parameters - folder

C:\Documents and Settings\MY_USER>
 

Willy Duitt

Banned
Joined
Oct 17, 2003
Messages
119
Before you can run the subst command that JohnWill provided - you will need to change the directory you are in to your root directory...

Type this first and press enter: cd c:\
Then type in the command JohnWill provided...
(this is all assuming your OS is on your C partition/drive - mine is on F)
.....Willy
 
Joined
Nov 2, 2002
Messages
22,468
Since there is a space in the directory name, you need to put it in quotes. That is why you are getting the error about "folder"

subst X: "C:\Myfolder\NEW folder"
 

Willy Duitt

Banned
Joined
Oct 17, 2003
Messages
119
I just checked - Bob is right - it is the space and the subst command should run from anywhere - not just from the root
 
Joined
Nov 2, 2002
Messages
22,468
Most command line programs, where directories or file names have spaces are used, need the quoation marks included. This is nothing new. Been around since long file names were introduced years ago.
 

Willy Duitt

Banned
Joined
Oct 17, 2003
Messages
119
Bob Cerelli said:
Most things, when run from the command line where directories or file names have spaces, need the quoation marks included. This is nothing new. Been around since long file names were introduced years ago.
I realize this about the spaces and using quotes - I did not notice the space until you mentioned it - The O/P's first post which I read was using a different folder name:

C:\Documents and Settings\MY_USER>subst X: C:\Myfolder

I was pointing out that my suggestion to change directories was not the underlying problem and submitting to your notice of the space in the second post...

.....Willy
 
Joined
Nov 2, 2002
Messages
22,468
Yep, it's always helpful to get the full information of what they want to do right from the beginning. It wasn't until their fourth post that all the detaills were included. You would have seen it otherwise as well.
 

Jag11

Thread Starter
Joined
May 30, 2005
Messages
1,244
Thanks guys it works! just one last question, can I assign other name/letters without a colon [ : ]? because my colon key is not working.
 

Jag11

Thread Starter
Joined
May 30, 2005
Messages
1,244
Wait, I found the solution. I find the Numeric Code for colon which is Alt+58

Thanks for the help guys
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top