命令行大全

subst

嚯嚯 发表于 2020-06-28 14:44浏览次数:

使用subst命令,您可以用虚拟驱动器号代替计算机上的另一个驱动器号。

查看英文版

目录:

1 subst 运行系统环境

2 subst 语法

3 subst 示例

subst 运行系统环境

Windows 95

Windows 98

Windows xp

Windows vista

Windows 2000

Windows 7

Windows 8

Windows 10

Windows NT

Windows ME

subst 语法

将路径与驱动器号关联。

SUBST [drive1: [drive2:]path] 
SUBST drive1: /D
drive1: 指定要分配路径的虚拟驱动器。
[drive2:]path 指定要分配给虚拟驱动器的物理驱动器和路径。
/D 删除替换的(虚拟)驱动器。

键入不带参数的SUBST以显示当前虚拟驱动器的列表。

Associates a path with a drive letter.

SUBST [drive1: [drive2:]path] 
SUBST drive1: /D
drive1: Specifies a virtual drive you want to assign a path.
[drive2:]path Specifies a physical drive and path you want to assign to a virtual drive.
/D Deletes a substituted (virtual) drive.

Type SUBST with no parameters to display a list of current virtual drives.

查看英文版

查看中文版

subst 示例

subst a: 

将当前目录和子目录设置为A:驱动器。因此,如果要键入A :,则在执行此命令后,您将在运行命令的目录中看到所有内容。

如果重新启动计算机,则除非将任何subst命令放入autoexec.bat或启动计算机时执行的其他位置,否则所有命令都将被清除。

subst a: 

Sets the current directory and subdirectories as the A: drive. So, if you were to type A: after executing this command, you would see everything in the directory from which the command was run.

If you reboot the computer, any subst command is cleared unless it was placed into autoexec.bat or another location that is executed upon starting the computer.

您不能替换网络驱动器,并且在创建驱动器后,不能为新驱动器添加新标签。

You cannot subst network drives and after a drive is created, you cannot give the new drive a new label.

查看英文版

查看中文版