@echo off
SETLOCAL ENABLEDELAYEDEXPANSION
for %%a 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 (
if exist %%a:\nul (
for /f "tokens=3" %%b in ('dir /-c %%a:\^|find "可用字节"') do set freesize=%%b
set /a freesize=!freesize:~0,-3!/1049>nul
if !freesize! GTR ^18000 (md %%a:\Temp & goto exit)
)
echo %%a不足18G,继续检查下一磁盘
pause
)
:exit
echo 任务完成,按任意键退出
pause
exit
不知道代码有没有问题。请各位检查下严谨了不
Last edited by heicai on 2007-2-1 at 08:57 PM ]