|
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
:lol 以上是老毛桃写的,请参考:lol |
|