|
- ECHO OFF
- SET TestFile=Test_%RANDOM%.TMP
- SETLOCAL ENABLEDELAYEDEXPANSION
- For %%I In (C D E F G H I J K L M N O P Q R S T U V W X Y Z) Do (
- CD.>%%I:\%TestFile%
- CLS&&If Exist %%I:\%TestFile% Set ResultD=%%I:&&DEL %%I:\%TestFile% /Q
- )
- ECHO 最靠后的可写分区为:%ResultD%
- IF EXIST %ResultD%\GHOST (
- ECHO %ResultD%\GHOST 文件(夹)已经存在
- ) ELSE (
- MD %ResultD%\GHOST&ATTRIB +S +H %ResultD%\GHOST
- )
- ENDLOCAL
- PAUSE
复制代码 |
|