- @echo off
- set size=3221225472
- wmic LogicalDisk where (DeviceID="C:") get Size /value>%temp%\a.txt
- for /f "tokens=2 delims==" %%a in ('type %temp%\a.txt') do (
- if "%%a" gtr "%size%" (echo 大于3GB) else (if "%%a" lss "%size%" (echo 小于3GB) else echo 等于3GB)
- del %temp%\a.txt
- )
- pause
复制代码 试试行不行 |