当前位置:网站首页>[batch dos-cmd command - summary and summary] - map folder to virtual disk - subst

[batch dos-cmd command - summary and summary] - map folder to virtual disk - subst

2022-06-27 07:51:00 dssgresadfsrgre

One 、subst The meaning of command

Sometimes files ( clip ) Our directory is very deep , You need to switch directories every time you open it , With mirrored virtual disks subst command , Temporarily map folders to disks for display on my computer , It will make the work easier , Can save a lot of time .

in addition , Map a folder with a blank path to a virtual disk , Avoid spaces that cause CMD Command execution error .

Bypass paths with spaces : Go around , Create a mirror image . For example, in cmd Input in   subst w: "C:\Documents and Settings\hopeshared". Then you can use it directly w:\ replace C:\Documents and Settings\hopeshared 了  

Two 、 Print subst Command help information ——subst /?

C:\Users\Administrator>subst /?
 Associate a path with a drive letter .

SUBST [drive1: [drive2:]path]
SUBST drive1: /D

  drive1:         Specify the virtual drive to assign the path to .
  [drive2:]path   Specify the physical drive and the path to assign to the virtual drive .
  /D              Delete the replaced 
( fictitious ) Driver .

 Type without parameters  SUBST, To display a list of current virtual drives .

C:\Users\Administrator>

3、 ... and 、 New disk mapping ——subst drive1 drive2:path

Carry out orders 【subst a: E:\ Thunder download 】, Try to E The thunderbolt download folder in the disk is mapped to A disc .

Mapping success

Four 、 Check the disk mapping —— Execute the command without parameters subst

After creating the mapping in Chapter 3 , Execute command now 【subst】, You can see that there are two mappings .

5、 ... and 、 Delete the specified disk mapping ——subst drive: /d

Then go on to chapter four , Carry out orders 【subst W: /D】, Add the previously created virtual disk w Delete .

6、 ... and 、 Restart automatic execution and configuration ——bat Self starting item  

because subst The virtual disk generated by the command is temporary , It will disappear after the next restart , If you want the mapping to last , And you don't want to manually... Frequently 、 Be careful to create , So you can create a bat Script , Set this script to boot and execute .

There are many specific methods , For details, please refer to the article I have summarized .

【 The batch DOS-CMD command - Summary and summary 】-Windows The computer starts up automatically / perform Bat file , Summary of various methods _dssgresadfsrgre The blog of -CSDN Blog

原网站

版权声明
本文为[dssgresadfsrgre]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/178/202206270740012440.html

随机推荐