如果有您经常访问的文件夹,这篇文章将向您展示如何在Windows 资源管理器(Windows Explorer)中快速访问这些文件夹,而无需输入文件夹的完整路径。我们将讨论将文件夹映射到驱动器号的三种方法。
方法一:使用 subst DOS 命令
首先,我们将使用一个旧的DOS命令,称为subst,它允许您为Windows中的任何文件夹分配驱动器号。
对于此示例,我们将为以下文件夹分配驱动器号:C:\Users\Lori Kaufman\Documents\My Work。
打开“开始(Start)”菜单并在“搜索程序和文件(Search programs and files)”框中输入“ cmd.exe ”(不带引号) 。单击结果中的cmd.exe以打开命令提示符窗口。
在命令提示符窗口中,键入以下命令以将驱动器“ Y: ”与文件夹关联。
subst y: “C:\Users\Lori Kaufman\Documents\My Work”
注意:(NOTE:)如果路径名中有空格,请务必在完整路径周围加上引号。
现在,当我们打开Windows Explorer时,我们会看到一个标有(Windows Explorer)Y:的新驱动器,它将直接打开My Work文件夹。
使用(Use)相同的过程为所有常用目录分配不同的驱动器号。但是,subst命令不能用于映射的网络文件夹。
方法 2:使用 psubst 实用程序
使用subst命令的一个缺点是这些虚拟驱动器是临时的,并且在您关闭或重新启动计算机或注销时将被删除。但是,您可以通过使用免费的psubst实用程序来解决此问题,该实用程序的操作类似于 subst 命令,但它会创建永久虚拟驱动器,即使在重新启动计算机后也能保持不变。
从下载psubst实用程序
https://github.com/ildar-shaimordanov/psubst
现在继续阅读我关于如何使用 psubst 将文件夹映射到驱动器号的(how to use psubst to map a folder to a drive letter)帖子。
方法 3:使用图形工具
如果您更愿意使用图形工具将驱动器号映射到文件夹,则有一个名为Visual Subst 的免费实用程序,它类似于(Visual Subst)psubst实用程序的图形版本。
从下载Visual Subst
http://www.ntwind.com/software/utilities/visual-subst.html
要安装Visual Subst,请双击您下载的.exe文件。
在安装选项(Installation Options)屏幕上,选中您要安装的程序快捷方式(Program Shortcuts)的复选框,然后单击下一步(Next)。
设置完成后,单击关闭(Close)。 双击(Double-click)快捷方式启动程序。您也可以从“开始(Start)”菜单启动它。
主Visual Subst窗口显示。从下拉列表中选择所需的驱动器号。
要选择要映射到所选驱动器号的文件夹,请单击编辑框右侧的浏览按钮。(Browse)
在“浏览文件夹(Browse For Folder)”对话框中,导航到要映射的文件夹,选择它,然后单击“确定(OK)” 。
要将所选文件夹映射到所选驱动器号,请单击驱动器号下拉列表左侧按钮栏上的绿色加号按钮。
虚拟驱动器被添加到列表中。通过选择驱动器号和相应的文件夹并将其添加到上述列表中来添加更多虚拟驱动器。(Add)
如果您希望在启动 Windows 时自动使用您定义的虚拟驱动器,请选中“在 Windows 启动时应用虚拟驱动器”(Apply virtual drives on Windows startup)复选框,以便在该框中有一个复选标记。
要保存Visual Subst的设置,请单击按钮栏上的软盘按钮。带有.ini扩展名的文件保存在安装Visual Subst的同一目录中。
映射的文件夹在 Windows 资源管理器中显示为硬盘驱动(Hard Disk Drives)器。
如果要删除文件夹的映射,请再次打开Visual Subst并从列表中选择虚拟驱动器。单击按钮栏上的红色X按钮。(X)
将文件夹映射到驱动器号可以为您节省大量时间,而Visual Subst使添加虚拟驱动器变得容易。Visual Subst适用于Windows 2000、Windows XP和更高版本的Windows ,包括Windows 7、8(Windows 7)和 10。尽情享受吧!
Assign Drive Letters to Folders in Windows
If there are folders that yoυ access frequently, this post shows you how to quickly acceѕs these folders in Windows Explorer without having to enter the full path to the folder. We will discuss three ways tо map fоlders to drive letters.
Method 1: Use the subst DOS Command
First, we will use an old DOS command, called subst, that allows you to assign a drive letter to any folder in Windows.
For this example, we will assign a drive letter for the following folder: C:\Users\Lori Kaufman\Documents\My Work.
Open the Start menu and enter “cmd.exe” (without the quotes) in the Search programs and files box. Click cmd.exe in the results to open the command prompt window.
In the command prompt window, type the following command to associate drive “Y:” with the folder.
subst y: “C:\Users\Lori Kaufman\Documents\My Work”
NOTE: If there are spaces in the path name, be sure to put quotes around the full path.
Now, when we open Windows Explorer, we see a new drive labeled Y: that will directly open the My Work folder.
Use this same process to assign different drive letters to all your frequently used directories. However, the subst command cannot be used with mapped network folders.
Method 2: Use the psubst Utility
A disadvantage of using the subst command is that these virtual drives are temporary and will be removed as soon as you shutdown or restart the computer or log off. However, you can solve this by using the free psubst utility, which operates like the subst command but it creates permanent virtual drives that are persistent even after rebooting your computer.
Download the psubst utility from
https://github.com/ildar-shaimordanov/psubst
Now go ahead and read my post on how to use psubst to map a folder to a drive letter.
Method 3: Use a Graphical Tool
If you would rather use a graphical tool to map drive letters to folders, there is a free utility called, Visual Subst, that’s like a graphical version of the psubst utility.
Download Visual Subst from
http://www.ntwind.com/software/utilities/visual-subst.html
To install Visual Subst, double-click on the .exe file you downloaded.
On the Installation Options screen, select the check boxes for the Program Shortcuts you want to install and click Next.
When the setup is completed, click Close. Double-click the shortcut to start the program. You can also start it from the Start menu.
The main Visual Subst window displays. Select a desired drive letter from the drop-down list.
To select a folder to map to the selected drive letter, click the Browse button to the right of the edit box.
On the Browse For Folder dialog box, navigate to the folder you want to map, select it, and click OK.
To map the selected folder to the selected drive letter, click the green plus button on the button bar to the left of the drive letter drop-down list.
The virtual drive is added to the list. Add more virtual drives by selecting a drive letter and a corresponding folder and adding it to the list as described above.
If you want the virtual drives you defined available automatically when you start Windows, select the Apply virtual drives on Windows startup check box so there is a check mark in the box.
To save the settings for Visual Subst, click the floppy disk button on the button bar. A file with the .ini extension is saved in the same directory where Visual Subst was installed.
The mapped folders display as Hard Disk Drives in Windows Explorer.
If you want to remove the mapping for a folder, open Visual Subst again and select the virtual drive from the list. Click the red X button on the button bar.
Mapping folders to drive letters can save you a lot of time and Visual Subst makes adding virtual drives easy. Visual Subst works in Windows 2000, Windows XP, and later versions of Windows including Windows 7, 8 and 10. Enjoy!