Re namejm:
It's a pity there's no Win2000 environment, so I can't test. The targeted solution needs you to detail the error message.
Currently, the way I can think of is to remove find, and it works under CMD@WinXP:
It's a pity there's no Win2000 environment, so I can't test. The targeted solution needs you to detail the error message.
Currently, the way I can think of is to remove find, and it works under CMD@WinXP:
@echo off & setlocal EnableDelayedExpansion
for %%d 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 %%d:\nul (
for /f "tokens=3" %%z in ('dir /-c %%d:\') do set freesize=%%z
set /a freesize=!freesize:~0,-3!/1049>nul
set freesize= !freesize!
set freesize=!freesize:~-9!
echo %%d drive free space:!freesize! MB
)
)
pause
※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得!

DigestI