Wednesday, March 2, 2011

Virtual Drive from a Folder

Today we are going to tell you about a secret DOS command "subst" which can be used to create a virtual drive in Windows Explorer for any of your desired folder.
For example, if you frequently use a folder "E:\Wallpapers", then you can create a virtual drive in Explorer which will directly go to this folder whenever you double click on it or access it from RUN or Command Prompt. It'll save a lot of time.
Here is how to do it:
Open Command Prompt and provide following command:
subst drive_letter: folder_path
for example, if you want to create a virtual drive letter H: for a folder "E:\Wallpapers", then use following command:
subst H: E:\Wallpapers
 If you want to delete this virtual drive, then provide following command:
subst drive_letter: /D


NOTE:
A. Remember! You can't use existing drive letters for creating virtual drives, e.g. if you have 2 partitions C: and D:, then you can't use them for subst command.
B. You should not use chkdsk, diskcomp, diskcopy, format, label and recover commands on virtual drives created using subst command as these virtual drives are not real and these commands either will not work or can cause problems for the actual drives where the folders reside.

source: Tweaking with Vishal