本帖最后由 apang 于 2012-3-23 13:40 编辑
- @echo off&setlocal enabledelayedexpansion
- set size=10737418240
- for /f "skip=1" %%a in ('wmic logicaldisk where ^(deviceid^="c:"^) get size') do set sizec=%%a
- set var=!sizec!&call :lp
- if !n! gtr 11 (echo 大于10G&pause&goto :eof
- ) else (
- if !n! lss 11 (goto st
- ) else (
- for /l %%a in (0 1 10) do (
- set/a a=!sizec:~%%a,1!&set/a b=!size:~%%a,1!
- if !a! gtr !b! (echo 大于10G&pause&goto :eof
- ) else if !a! lss !b! goto st
- )
- )
- )
- :st
- del /s /q C:\stw\Master\*.*
- start "" C:\A.jpg
- goto :eof
- :lp
- if not "!var!"=="" set var=!var:~0,-1!&set/a n+=1&goto lp
复制代码 写的很啰嗦,哪位高手简化下。 |