::by different
::for 简体winXP
::如用在英文版的XP要稍改一下代码
@echo off
set drive=w
echo 驱动器%drive%上的所有数据将会被清除!!!
pause
:nov
for /f "eol=卷 tokens=*" %%a in ('vol %drive%:') do set check'=%%a
set check=%check':~-1%
if "%check%"=="。" (format %drive%: /y) else goto hasv
goto end
:hasv
for /f "eol=卷 tokens=*" %%b in ('vol %drive%:') do echo %%b>h_temp.txt
for /f "tokens=3* delims= " %%c in (h_temp.txt) do (
if "%%c"=="中的卷是" echo %%d>h_temp.txt
)
format %drive%: /y & label %drive%:<h_temp.txt 2>nul && del h_temp.txt
:end
pause