DOS the Easy Way by Everett Murdock Ph.D.CLICK HERE for information about downloading the book.
Type: External (2.0 and later)
ASSIGN x=y [...] /sta
Purpose: Redirects disk drive requests to a different drive. (In DOS Version 6, this program is stored on the DOS supplemental disk.)
DiscussionUse the ASSIGN command to change drive assignments from the drive indicated by the first letter you enter (x), to the drive indicated by the second letter (y) entered. Do not enter a colon after the drive letters.
Entering the command without any parameters causes all drive reassignments to be reset to normal. The equal sign is optional.
In DOS Version 5 you can use the /sta (status) parameter to display a report of the currently assigned drives.
This command is especially useful when you are using a program that automatically attempts to read or write to a specified drive. By reassigning that drive letter, you tell DOS to ignore requests to the first drive letter and instead carry out both reads and writes on the second drive letter. When you want DOS to again carry out drive requests as usual, enter ASSIGN without any options.
You can use this command with application programs that attempt to act on drives you don`t want to use (or don`t have installed in your computer).
This command should not be used with other DOS commands that need to get drive information. The FORMAT, DISKCOPY and DISKCOMP will ignore any drive reassignments. Also, don`t use the BACKUP, RESTORE, LABEL, JOIN, SUBST, or PRINT COMMANDS with redirected drives.
DOS sends any requests for drive A to drive B. After this form of the command is entered, the command
will result in a display of the files on drive B instead of drive A.
You can reassign more than one drive at a time (leave a space between entries). For example, enter
assign a=b c=b
Requests for either drive A or drive C would automatically be sent to drive B.
For example, if you enter
DOS will display a directory of the files on drive B (not of drive A).
and a report of the assigned drives will be displayed in the following format:
Original A: set to D:
Original B: set to D:
For more information about this command, refer to the downloadable book DOS the Easy Way.
Have you ever needed to repeatedly access a folder that is nested deep inside a giant hierarchy of folders? Sure, you can always create a shortcut to that folder, but did you know you can actually assign a drive letter to a folder instead? Today we’ll show you how to do this.
This ability has existed in Windows via the subst command for quite a while, so this will also work for you XP users as well.
Map a Drive Letter the Easy Way
The easiest way to assign a drive letter to a folder is to use a simple utility called Visual Subst, which gives you a nice graphical interface to assign drive letters, but also does something that the command line version can’t… you can set your virtual drives to apply again at startup.
You can download and run the utility without needing to install it, and then simply use the Browse button to select your path, and click the green plus symbol after choosing the drive letter.
At this point you should see the drive letter show up in the list. (Note that you can delete it by highlighting and choosing the red X icon, or change the path / letter by using the Save button.
If you want to save the drives, you’ll want to select the “Apply virtual drives on Windows startup” option.
Now when you open up your Computer window, you should see the new drive show up in the list.
The contents of the new M: drive will actually be the contents of my desktop folder.
Download Visual Subst from ntwind.com
Assign Drive Letters from the Command Prompt
If you are more the keyboard ninja type, or just want to know how to use the command line version, you can use the subst command to map drive letters the same way by using the following syntax:
subst <driveletter> <folder path>
For example, to map the M: drive to my desktop folder I would use the following command:
subst M: c:\users\geek\desktop
If you just want to see which drive letters are assigned, you can use subst without any arguments, as shown here:
To delete a drive letter you can use the /D switch instead of a path… for instance, to delete the M: drive that I just created, I would use the following syntax:
subst M: /D
Now when you use the subst command to see the current drives, you’ll see nothing in the list.
I’ve found the subst command to be very useful, not just in shortening folder paths but also in one instance where I wanted to delete my second partition… I just reassigned the D: drive letter to point to C: and copied all the data over. That way the application shortcuts still worked without having to reinstall the application.