Map a local folder as a network drive. Creating a virtual disk from a folder using the Subst command


Instructions

Mount an arbitrary folder as a virtual disk in operating systems Windows family. Launch cmd command processor. To do this, display the Start Programs dialog by selecting Run from the Start menu, typing cmd in the Open text box, and clicking OK.

Use the subst command to mount the folder. Enter in the console:

subst/?
Press Enter and check out brief information on team work. Mount the folder using a command like:
subst<Буква целевого диска>: <Путь к папке>
For example, to create virtual disk X with the contents of the D:\Temp folder, you would run the command:
subst X: D:\Temp

On Windows, mount the remote network share folder as a drive. Open the My Computer folder window. To do this, use the corresponding shortcut on your desktop. You can also run Windows Explorer by entering explorer in the Start Programs dialog and clicking OK, then selecting the appropriate section in the right pane.

Display the Mount Network Share dialog. Expand the “Service” section of the main menu and click on “Connect” network drive».

Perform installation. In the "Drive:" drop-down list, select the item containing your preferred letter the disk being created. In the “Folder” field, manually enter the path to it or click on the “Browse” button and select it. Check the “Recover at logon” checkbox if the resource is going to be used for a long time. Click the "Done" button. If necessary, enter the credentials to access the remote folder and click the OK button of the displayed dialog.

Mount an arbitrary folder as a directory with a different name in Linux operating systems. Use the mount command with the --bind (or -B) switch. Launch a terminal emulator or switch to a text console. Run a command like:

mount --bind<путь-1> <путь-2>
As parameters<путь-1>And<путь-2>must indicate complete or relative paths up to two existing catalogs. For example:
mount --bind /home/develop /mnt/test
After executing this command, the contents of the /home/develop folder will be displayed in the /mnt/test directory.

Mount a remote network folder to a local directory in a Linux operating system. Use the mount command with the -t switch to specify the type file system. For example, to mount a remote Temp folders on a windows machine with IP address 10.20.30.40 in the local directory /mnt/test, you can run the command:

mount -t smbfs //10.20.30.40/Temp /mnt/test
A password to access the resource will be requested. If you need to specify credentials on the command line, this can be done using additional parameters username and password specified after the -o switch. In a similar way (using curlftpfs) you can mount FTP folders.

Local network offers many advantages sharing various resources. For example, . An unlimited number of people can access one network folder. And it's convenient. But the process of using network folders can be made even more convenient.

Typically, to get to a network folder, users use one of several options:

  • Entering the full address of a network folder in address bar Windows Explorer.
  • Entering the full address of the network folder in the Run window.
  • Search for a computer in Network environment and then going to the desired folder.

In addition to the examples given, there are some other ways to navigate to a network folder. But most of them require entering the address of a network folder. Entering the same address every time (which even though it is stored in the computer's memory) can be difficult. More in a convenient way going to a network folder can be connecting a network folder to My computer. In this case, in My computer You, together with your local and external drives, you will also see connected network folders.

The process of connecting a network folder to My computer is very simple and consists of the following steps:

  1. Right click on the icon My computer.
  2. Select an item Connect a network drive.
  3. Select a letter for the disk being created.
  4. Entering the full address of the network folder.
  5. Button press Ready.

If everything was completed successfully, including a test connection to a network folder, then in the window My computer You will see a connected network drive, which means that we have completed our task.

How to map a local folder as a network drive?

Using the above method, you can connect a network folder, but only that folder that is actually a network folder, that is, not located on this, on local computer. But with a simple trick you can local folder add to window My computer under the guise of a network drive, that is, connect a local folder as a network drive. To do this you need to know the following: folder

C:\Users\UserName\AppData\Roaming\Microsoft\Windows\Network Shortcuts

contains shortcuts to network resources, which should be displayed in the window My computer. This means that the newly connected network folder is also located in this location. Therefore, if you create a shortcut to a local folder and copy it to the folder above, the system will consider it a network drive and display it in the appropriate location. That's enough simple steps you can connect a network folder, as well as a local folder, like a network drive, which will be displayed in the window My computer.

To get to any folder, we have to click a lot in Explorer, unless, of course, you have placed the folder shortcut on Desktop. A desktop shortcut is, of course, good. But filling the desktop with shortcuts is also not nice, especially since an empty desktop is not bad. And some people may not like labels at all. In this case, to make access to the local folder easier, you can turn the folder into a virtual one logical drive. In other words, your desired folder will be located in the window My computer together with others local disks. And then you only have to make two clicks to get to desired folder. Our article is entirely devoted to how you can create a virtual disk from any folder on your computer.

Create a virtual disk

Before creating a new virtual disk (not to be confused with), we need to get a free letter that is not used by other disks. To do this, open a window My computer and using your knowledge of the English alphabet, choose a letter that is not used in this moment. Let's say this is a letter Y. After this you need to open the window command line Windows and run the following type of command:

subst Y: c:\dir\seconddir\

The only thing that needs to be adjusted to your needs is the path of the folder that we turn into a virtual logical disk. After executing this command, you can check the quantity logical drives in the window My computer. I'm sure there are more of them there. Like this in a simple way you can create a virtual disk from a folder.

The Other Side of the Virtual Disk Coin

The other side of the coin is that the created virtual logical disk will last only as long as you do not turn off your computer. After a reboot, this logical drive will disappear. Therefore, the above command must be executed at every boot. To accomplish this, you can create .bat-file based on the above code. The creation of such a bat file was discussed in detail in the article, I suggest you read it. After this, created .bat-the file must be copied to the folder located at

C:\Users\Username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

If everything is done correctly, then with each new boot operating system will fulfill this command, the result of which we have already examined.

In addition to the above method, which will always work, I can suggest another method that may not work in the case of network folders. In this case, in order for the created virtual disk from the folder to appear in its place every time the computer boots, you need to open the Registry Editor (use the commands quick launch) and go to the section

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices

In this node you need to create a String Value parameter and give it a name in the form of a letter virtual disk. For our example, you will need to specify the name Y:

for the created parameter. The value of this parameter should be as follows:

\??\c:\dir\seconddir\

With these simple steps you can create a virtual disk from a folder on your computer.

So, how to map a network drive on Windows 10? We already know how to create it, but it’s not very convenient to search for the required shared folder in the network environment, especially if there are a lot of computers. It is much easier to have it displayed as separate disk, which appears along with your “C” drive when the system boots.

To connect the network hard drive on Windows 10, the first thing you need to do is allow general access to files and folders on your computer. To do this, click right click mouse on the “Start” menu and go to “ Network connections»


Here in the left column click on “Change sharing settings”


Mapping a network drive Windows 10

This was the preparatory stage - now let’s move on to the main question, how to connect a network drive in Windows 10?
To do this, you need to open Explorer and in the left column, where the tree of drives and folders is, find the “My Computer” link - right-click on it and select “Map network drive...”.

In the window that pops up after this, select the letter for our future network Windows disk, for example "X".


After selecting the folder, leave the “Restore at logon” checkbox so that you don’t have to create it again every time you turn off the computer. And click “OK”.

Now, when you go to “Computer” in Explorer, among other system hard drives we will be able to see the “Z” drive in the “Network Location” section. you can get to it provided that the computer on which this network drive-folder placed, included.

Mapping a network drive on Windows XP

The technique for connecting a network drive on Windows XP is similar to that already described above. Therefore, we will describe here the connection method directly from the section “ network».

Go to “Start > Network Neighborhood” and find the one we need shared folder on one of the computers local network. Right-click on it and select the “Map network drive” menu item. You can also simply top menu select “Service” and select the same section.

Now if you go to “My Computer”, you will see hard disks, as well as network folders connected as network drives, indicated by separate icons.

That's all. For those who have not yet understood what it’s like, here’s a video:







2024 gtavrl.ru.