清理垃圾把语音聊天删掉可以恢复吗 清理垃圾bat( 七 )


echo.
if %timeGoal%==N goto cancel
if %timeGoal%==n goto cancel
set tmp=%timeGoal%
::将\”号替换成空格
set /a num = 0
set \”tmp=%tmp:\”= %\”
:next
if not \”%tmp:~0,1%\”==\”:\” (
set /a num+=1
set \”tmp=%tmp:~1%\”
goto next
)
set /a hourNow = %time:~0,2%
set /a minuteNow = %time:~3,2%
set /a secNow = %time:~6,2%
set /a hourGoal =!timeGoal:~0,%num%!
set /a num+=1
set /a minuteGoal = !timeGoal:~%num%,2!
set /a \”diffT = hourGoal – hourNow\”
::diffT<0;
if %diffT% lss 0 (
echo 将设置为明天%timeGoal%关机
set /a \”diffT = diffT + 24\”
)
set /a \”diffT = diffT*3600+(minuteGoal-minuteNow)*60 – secNow\”
if %diffT% lss 0 (
echo 将设置为明天%timeGoal%关机
set /a \”diffT = diffT + 86400\”
)
shutdown -s -t %diffT%
echo 已设置%timeGoal%的关机计划
goto exit
:cancel
shutdown -a
echo 已取消当前设定
goto exit
:exit
echo.
echo 3秒后退出……
choice /t 3 /d y /n >nul
3、Windows下查询IPv4的BAT脚本
新建一个txt文件 , 将其名称改为myIP.bat , 复制以下脚本 , 保存 , 双击执行 , 即可查询本机IPv4地址了 。
代码如下:
@echo off
echo 查询IP地址:
ipconfig |find \”IPv4\” > 1.txt
set /p a=<1.txt
for /f \”tokens=2 delims=:\” %%a in (\”%a%\”) do echo %%a
echo 按任意键(不包括关机键)退出 。。。
pause>nul
注释:
ipconfig |find \”IPv4\”
得到的结果是将ipconfig的命令的结果过滤出含有IPv4的记录
4、向你爱的人表白的BAT脚本
@echo off
:a
cls
echo.
echo.
echo.
set /a a+=2
for %%a in (我 爱 的 人 是 你) do (set /p=%%a<nul&ping -n 2 127.1>nul &set /p=→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→<nul)
echo 李羽瞳
for %%a in (——————————————————————————————————————————————————————————————————————) do (set /p=%%a<nul&ping -n 2 127.1>nul &set /p=张涵予<nul)
ping -n 3 127.1>nul
if %a% lss 8 (goto :a)
cls
exit
效果图:

清理垃圾把语音聊天删掉可以恢复吗 清理垃圾bat


5、清理系统垃圾的脚本
@echo off title专用垃圾清工具 , 正在清理中…
echo 正在清除系统垃圾文件,请稍等……
del /f /s /q %systemdrive%\\*.tmp
del /f /s /q %systemdrive%\\*._mp
del /f /s /q %systemdrive%\\*.gid
del /f /s /q %systemdrive%\\*.chk
del /f /s /q %systemdrive%\\*.old
del /f /s /q %windir%\\*.bak
del /f /s /q %windir%\\temp\\*.*
del /f /a /q %systemdrive%\\*.sqm
del /f /s /q %windir%\\SoftwareDistribution\\Download\\*.*
del /f /s /q \”%userprofile%\\cookies\\*.*\”
del /f /s /q \”%userprofile%\\recent\\*.*\”
del /f /s /q \”%userprofile%\\local settings\\temporary internet files\\*.*\”
del /f /s /q \”%userprofile%\\local settings\\temp\\*.*\”
echo 清除系统垃圾文件完成!