- @echo off
- echo >tmp.vbs Wscript.Echo int(wscript.arguments(0)/1024/1024)
- for /f "skip=1 tokens=1-3" %%a in ('wmic logicaldisk where "drivetype=3" get name^,filesystem^,freespace') do (
- if not ""=="%%b" (
- for /f %%i in ('cscript //nologo tmp.vbs %%b') do (
- echo %%c 分区格式:%%a 剩余空间:%%i MB
- )
- )
- )
- del tmp.vbs
- pause
复制代码 搜素下论坛,很多这样帖子。 |