电脑长时间使用后,会积累大量垃圾文件占据内存,导致运行速度变慢,影响正常使用体验。因此,定期清理垃圾文件是很有必要的。那么,windows 10系统如何实现一键清理垃圾呢?下面给大家介绍一种简单的方法——通过编写代码来实现自动清理垃圾的功能。感兴趣的朋友可以跟着步骤一起操作。
Windows 10一键清理垃圾的方法
@echo offpause
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 清理系统垃圾完成! echo. pause