@echo off
setlocal enabledelayedexpansion
for /f "skip=1 tokens=1,2 delims=\" %%a in ('fsutil fsinfo drives^|find /v ""') do (
set aa=%%a
set aa=!aa:~-2!
for %%i in (!aa!) do (
fsutil fsinfo drivetype %%i|find "移动" >1.txt
for /f "tokens=1 delims=-" %%j in (1.txt) do (
dir %%i\ >>nul
if errorlevel 1 echo %%i-------------------------------------------不可读
if errorlevel 0 echo %%i------------------------------------------可读
echo temp >%%i\1.txt
if errorlevel 1 echo %%i-------------------------------------------不可写
if errorlevel 0 echo %%i-------------------------------------------可写
del /f %%i\1.txt
)
)
)
del /f 1.txt
pause
[ Last edited by huajinghua on 2008-2-23 at 09:35 PM ]