首页 > 其他分享 >清理电脑bat批处理脚本

清理电脑bat批处理脚本

时间:2023-02-21 19:12:30浏览次数:35  
标签:bat 批处理 systemdrive% 清理 echo %% del userprofile% windir%

@echo off
echo 正在清除系统垃圾文件 请稍等......
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*._mp
del /f /s /q %systemdrive%\*.log
del /f /s /q %systemdrive%\*.gid
del /f /s /q %systemdrive%\*.chk
del /f /s /q %systemdrive%\*.old
del /f /s /q %systemdrive%\recycled\*.*
del /f /s /q %windir%\*.bak
del /f /s /q %windir%\prefetch\*.*
rd /s /q %windir%\temp & md %windir%\temp
del /f /q %userprofile%\cookies\*.*
del /f /q %userprofile%\recent\*.*
del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"
del /f /s /q "%userprofile%\Local Settings\Temp\*.*"
del /f /s /q "%userprofile%\recent\*.*"
echo 清除系统垃圾完成 请检查浏览器是否已正常打开
::清空Win7/Win8回收站
for %%a in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
if exist %%a:\ (
del /f /s /q "%%a:\$recycle.bin\*.*" >nul 2>nul
)
)

用管理员身份运行该脚本。

标签:bat,批处理,systemdrive%,清理,echo,%%,del,userprofile%,windir%
From: https://www.cnblogs.com/ezhar/p/17142091.html

相关文章

  • 七、Spring整合MyBatis
    整合思路将SqlSessionFactory配置到Spring容器中<!--加载jdbc.properties--><context:property-placeholderlocation="classpath:jdbc.properties"/><!--配置数据源-......
  • MyBatis中mapper文件的常用标签
    <sql>标签:用来封装sql语句或者复用语句的,然后用<include>标签来调用<sqlid="selectFields">stuid,stuname,stuclass,stuage</sql><selectid="selectStudentByNam......
  • 六、MyBatis的注解开发
    MyBatis的常用注解这几年来注解开发越来越流行,Mybatis也可以使用注解开发方式,这样我们就可以减少编写Mapper映射文件了。我们先围绕一些基本的CRUD来学习,再学习复杂映射......
  • idea中配置mybatis 映射文件模版及 mybatis plus 自定义sql
    本文为博主原创,未经允许不得转载:mybatisplus 使用过程中已经很大程度提升了我们开发的效率,因为它内部已经对单表的操作进行了完美的封装,但是关联表操作时,这时就需要自......
  • mybatis plus 主键策略
    博主原创,转载请注明出处:mybatis plus 对实体类映射表的主键做了注解支持,该注解为@TableId,如果不使用该注解,mybatisplus 默认主键生成的策略是内部封装的雪花算......
  • mybatis plus 中增删改查及Wrapper的使用
    本文为博主原创,未经允许不得转载:mybatisplus 通过封装 baseMapper 以及 ServiceImpl,实现对数据库的增删改查操作,baseMapper 是我们通常所说的dao层或mapper......
  • 搭建 spring boot + mybatis plus 项目框架并进行调试
    本文为博主原创,未经允许不得转载:1.创建一个spring boot的工程应用:File---->New----->Project----> 然后选中SpringInitializr 继续创建:  2.添加sprin......
  • mybatis配置文件resultMap标签的使用
    本文为博主原创,未经允许不得转载:      resultMap标签是为了映射select查询出来结果的集合,其主要作用是将实体类中的字段与数据库表中的字段进行关联映射。    ......
  • mybatis中mysql转义讲解
    本文为博主原创,未经允许不得转载:     在mybatis中写sql的时候,遇到特殊字符在加载解析的时候,会进行转义,所以在mybatis中写sql语句的时候,遇到特殊字符进行转义处理。 ......
  • Mybatis
    1、Mybatis简介1.1、什么是MyBatisMyBatis是一款优秀的持久层框架MyBatis避免了几乎所有的JDBC代码和手动设置参数以及获取结果集的过程MyBatis可以使用简单的X......