Command to assign local folders as network drives with drive letters!
Local folders can be assigned as network drives with drive letters via the command prompt on Microsoft Windows 11, 10, ... etc. Desktop and MS Server OS!
The net use command
is popular to assign your own computer to shared drives on a network as drive letters. Everyone knows the map network drive function
, but very few people know that there is another command with which you can do the same in every folder on one of your local hard drives in order to access the folder directly via the drive letter
1.) Assign a drive letter to the local folder!
With the command:
1. show connected: subst
2. remove connected from z: subst /D Z:
3. connect C:\Windows: subst z: c:\windows\system32
we can assign the Z:\ drive to the folder and access it!
PS: When you restart the computer, any Subst command will be deleted unless it was placed in autoexec.bat or another location that runs when the computer starts . Or for example in Windows Autostart !
| (Image-1) Command to assign local folders as network drives with drive letters!
In this sense, the subst command can be used to replace the virtual drive letter with another drive letter on your computer.
2.) Release the drive letter again!
With the command:
subst /d z:
We can assign the to the folder and remove the access via P \ again!
( ... see Image-2 )
The functions of subst :
C:\Users\Nenad> subst /?
Assigns a drive label to a path.
SUBST [Drive1: [Drive2:] path]
SUBST Drive1: / D Drive1
: Name of the virtual drive that is
to be assigned to the path .
[Drive2:] Path Physical drive and physical path
to be assigned to the virtual drive.
/ D Removes the assignment for (virtual) drive1
SUBST without parameters shows the virtual drives created with SUBST.
| (Image-2) Remove the drive letter assignment from the local folder!
This command prompt trick can make it much easier to access a specific location via the command prompt and the folder will appear as a Windows drive next to all of your real hard drives.
3.) What should be considered when assigning drive letters, history!
You can only use free drive letters AZ!
Drive letter mapping is the process of alphabetically mapping identifiers to the paths. In contrast to the concept of UNIX mount points, in which volumes are arbitrarily named and arranged in a single hierarchical namespace, drive letter assignment enables multiple namespaces at the highest level. Thus, drive letter assignment is a process of using letters to denote the roots of the "forest" that makes up the file system.
FAQ 72: Updated on: 26 August 2023 10:44
With the command prompt it is easy to delete the temporary files on Windows 11, 10, drives with a command Anyone who knows Windows drive cleaning and
It is easy to solve the problem with MS Windows OS to read / display license key via command line If you want to reinstall your Windows 10 or 11, it is
Repairing the bad sectors of the hard drive SSD, HD, using Command Prompt / CMD.EXE commands on Windows 11, 10, and MS Server OS is easy Everyone
It is easy to format an external hard drive or USB stick via the command prompt / cmd.exe for MS Windows 11, 10, etc. Everyone probably knows how
Starting two or more programs at the same time from the command prompt is pretty easy on Windows 11, 10, etc. Even if this function is not as advantageous
Almost like under Linux and MAC OS, you can simply change the file attributes on Windows via the command line The standard procedure is familiar to everyone,
Using the command line it is also easy to synchronize your MS Windows OS with a www time server The simplest method for synchronizing with a time server
»» My question is not there in the FAQ
|Asked questions on this answer:|
- I need to access folders frequently, and I want to learn how to quickly access these folders in Windows Explorer without having to enter the full path to the folder. We're going to discuss three ways to map folders to control letters, is that possible?
- How can I assign drive names to local folders?
- Can a local path be drive lettered, a way of mapping as drive lettered network paths?
- Can I create a shortcut to a folder in the directory tree under Windows that is not assigned as a path but as a drive with letters and is accessible?
- I'm not entirely sure that a mapped drive will work, and so far this is the technique I ended up using, but it doesn't seem to cut into it until quite late in the boot process. I've also tried putting SUBST commands in batch files during startup in the past, but that doesn't seem to work either.?
- Always wanted to create a drive letter mapping on your local system on Windows? Usually the mappings are reserved for network paths, but mapping a local path to a drive letter can be useful for development or just as a shortcut.
- I heard that you can assign a folder to a drive letter in Windows that it can be reached via the My Computer button. I'm tired of rummaging through the directory structure on long ways, is there a way to assign a drive letter to a folder with a long path as the map. This would save me a lot of time on frequently accessed folders. For example, I could assign a long path like D: \ My Documents \ Stefan \ to drive letter Z.?
- Via Windows command line a connection / mapping that works properly not as a folder but as a drive, would it be useful for me with local folders?
- Can I simulate local paths in the network environment as access via drive letters?
- How to map a local folder with a drive letter in Windows 11, 10, ...?
- I always wanted to define a drive letter on the PC locally under Windows on a folder or directory that is reserved for network paths?
Keywords: windows, console, command, assign, local, folders, network, drives, with, drive, letters, assigned, prompt, Questions, Answers, Software