首先用下面命令恢复你的E: 盘- @echo off
- :start ============================================================
- if not exist Volume.txt (mountvol|findstr "\\\\\?\\Volume">Volume.txt)
- for /f "skip=1 usebackq delims= " %%a in ("Volume.txt") do (
- echo %%a
- mountvol E: %%a 2>nul&&goto end
- )
- :end ==============================================================
- pause
复制代码 在用下面的:- @echo off
- setlocal enabledelayedexpansion&cls
- :start ============================================================
- for /f "delims=\" %%i in ('fsutil fsinfo drives^|find /v ""') do (
- set var=%%i
- set drive=!var:~-2!
- set/a find_BL=0
- echo.|label !drive! 2>nul|find /i "scyz-zy"&&(set/a find_BL=1&echo OK)
- if "!find_BL!"=="1" (
- echo !drive!
- for /f "delims= " %%m in ('mountvol E: /l') do echo E: +%%m+ & set E_old=%%m
- for /f "delims= " %%a in ('mountvol !drive! /l') do (
- echo !drive! +%%a+
- mountvol E: /d&mountvol !drive! /d
- mountvol E: %%a&mountvol !drive! !E_old!
- )
- goto end
- )
- )
-
- :end ==============================================================
复制代码
|