搜一下脚本里没有:exit标签
flashercs 发表于 2022-6-10 16:00 - @mshta vbscript:msgbox("清理已完成下面进行磁盘空间的测试","64"," ")(window.close)
- @echo off&setlocal EnableDelayedExpansion
- title 查看清理后的磁盘剩余空间
- mode con cols=45 lines=24&color 17
- echo;&echo;≒━━━━━═≈═━━━━═≈═━━━━━≒
- echo; ║ ║
- echo; ┋ ┋
- echo. ╔─────╩──────╩─────╗
- for %%i in (C D E) do (
- if exist %%i:\ (
- for /f "skip=5 tokens=3" %%a in ('dir /a/-c %%i:\') do set sz=%%a
- set L=!sz:~-9!&set H=!sz:~,-9!&set G=0&call :fl
- set xs= !G!!d!!sm!&set str=!xs:~-9! !z!B
- set/p= ┋—^> <nul
- set /p= <nul>"%%i--"&findstr/a:1!cc! . "%%i--"*
- set/p= 盘可用剩余空间为 <nul&ren "%%i--" "!str!-"
- findstr/a:1!cc! . "!str!-"*&del "!str!-"&set/p= ┋<nul&echo.))
- echo. ╠━━━━━═━━━━━━═━━━━━╣
- if "!y:~,-5!" gtr "0" set /a x+=!y:~,-5!
- set xy= !x!.!y:~-5!
- set/p= ┃◎ 总计可用剩余空间为 <nul
- set str=!xy:~-11,10! GB&set /p= <nul>"!str!-"
- findstr/a:1e . "!str!-"*&del "!str!-"&set/p= ┃<nul&echo.
- echo. ╚━━━━━━━━━━━━━━━━━━╝
- echo. ---------------------------------
- @mshta vbscript:msgbox("可能会在本文件夹中出现临时的文件,名称为C--或F--或D--,不用担心,将其拖动几下即可消失","64"," ")(window.close)
- echo;&echo;&set/p= 请按任意键退出<nul
- pause>nul&exit
-
- :fl
- if "!L:~,1!"=="0" set L=!L:~1!&goto :fl
- %o% set/a bs=!random!%%2,ms=!random!%%2&set o=rem
- if !H! gtr 8 (if !bs!==0 (set cc=a) else set cc=f
- set/a bs=^^!bs) else if !ms!==0 (set cc=b) else set cc=d
- if !H!==8 if !L! geq 589934592 (set cc=a
- ) else if !ms!==0 (set cc=b) else set cc=d
- if !H! gtr 1 set/a ms=^^!ms&set d=.&set z=G&goto n
- if !sz! geq 1048576000 set/a ms=^^!ms&set d=.&set z=G&goto n
- set L=!sz:~-9!&set cc=c&call :mm
- if !sz! lss 1024000 (set cc=c1&set z=K&set G=&set d=&set /a sm=sz/1024) else (
- set z=M&set d=.&set/a G=sz/1048576,sm=sz%%1048576*100/1048576)
- goto :eof
- :n
- if "!L:~,1!"=="0" set L=!L:~1!&goto :n
- if !H! lss 2 goto :m
- if !H! equ 2 if !L! lss 147483648 goto :m
- :s
- if !L! geq 147483648 (set/a L-=147483648) else set/a H-=1,L+=852516352
- set /a H-=2,G+=2&goto :n
-
- :m
- set /a hb=!H!000000000+!L!
- set L=!hb:~-9!&set H=!hb:~,-9!
- if !H! lss 2 goto :mm
- if !H! equ 2 (
- if "!L:~,1!" equ "0" goto :mm
- if !L! lss 147483648 goto :mm)
- goto :s
-
- :mm
- set sz=!H!!L!
- if !sz! gtr 1073741824 set/a sz-=1073741824,G+=1
- set /a sm=sz/10738,x+=G,y+=sm
- set sm=0000!sm!&set sm=!sm:~-5,4!
- goto exit
复制代码
|