联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
CODE: [Copy to clipboard]for /f "tokens=3" %%c in ('dir /a/s/-c d:\^|find "个文件"') do set allfilesize=%%c
CODE: [Copy to clipboard]for /f "tokens=3" %%c in ('dir /a:-d/s/-c/w d:\^|find "个文件"') do ( set allfilesize=%%c ) if "%allfilesize%" == "" goto notgetfilesize goto shownumber :notgetfilesize for /f "tokens=3" %%c in ('dir /a:-d/s/-c/w d:\^|find "File(s)"') do ( set allfilesize=%%c ) if "%allfilesize%" == "" goto notgetfilesize1 goto shownumber :notgetfilesize1 goto end ::for /f "tokens=3" "delims=" %%i in ('dir /a:-d /s /-c /w D:\backupsys^|find "File(s)"') do set /a allfilesize+=%%i ::/1048576 :shownumber @echo FILE SIZE: %allfilesize% @echo DISK SIZE: %diskfreesize% if %allfilesize% geq %diskfreesize% echo There was no rich space to backup ! if %allfilesize% lss %diskfreesize% echo The backup is start