Vritual Disk Mapping

Create Vritual Disk Mapping

  • 将物理盘符中的目录映射到虚拟盘符,能够在一定的场景发挥作用
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
@echo off
::在物理盘符下创建文件夹
::如果存在虚拟盘符就执行删除盘符映射关系
::创建虚拟盘符并映射到物理盘符的文件夹
::打开虚拟盘符

::H 物理盘符名
md H:\RECYCLED\UDrives.{25336920-03F9-11CF-8FD0-00AA00686F13}>NUL
::M 虚拟盘符名
if exist M:\NUL goto delete
::映射虚拟盘符 M 到 物理盘符 H 下的 RECYCLED\UDrives.{25336920-03F9-11CF-8FD0-00AA00686F13} 目录
subst M: H:\RECYCLED\UDrives.{25336920-03F9-11CF-8FD0-00AA00686F13}
start M:\
goto end
:delete
subst /D M:
:end
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
@echo off
set inputTimes=3
echo.
echo Notice:Three opportunities.
echo.

:1
set /p password=Input password:
if \"%password%\"==\"IamPassword\" goto o

set /a inputTimes-=1
if \"%inputTimes%\"==\"0\" cls&echo.&echo =<Passenger no entry>!!!=&echo.&pause&echo.&exit

cls&echo.&echo There are %inputTimes% opportunities left&echo.&goto 1

:o
cls&echo.
echo= Welcome!!! =
md H:\RECYCLED\UDrives.{25336920-03F9-11CF-8FD0-00AA00686F13}>NUL
if exist M:\NUL goto delete
subst M: H:\RECYCLED\UDrives.{25336920-03F9-11CF-8FD0-00AA00686F13}
start M:\
goto end
:delete
subst /D M:
:end
< - あの日途切れてしまった言葉を 繋ぎ留めたいだけ - >