Win10 system automatically executes the method of garbage file cleaning

  

When using the computer for a long time, there will be a lot of junk files in the operating system. Although the system itself has settings to automatically clean up some garbage, this ability is in Guo Degang's words, "the ability is general, the level is limited", and if If we need to clean it ourselves, it will waste a lot of time to sort out. Is there any way to set up a bat to automatically clean up the junk files every time it is turned on?

The following mainly introduces how to set up temporary files for automatically deleting Windows 10 system. These files are usually placed in the C:\\Users\\username\\AppData\\Local\\Temp folder, where files and folders can be safely deleted (as long as there are no currently running tasks). To get into the temp folder, there is a shortcut: enter: %tmp% and press Enter.

Using this shortcut, we can make a temp delete the contents of a batch file, as follows:.
@echo off del "% tmp% \\ * * " /s /q /f FOR /d %%p IN ("%tmp%\\*.*") DO rmdir "%%p" /s /q

Copy and paste the above text into Notepad and save as The .bat file can be used, and the file name is self-explanatory. Then you can move to the "Start" folder (running "Run: "shell: Startup" can be entered), so that the system is clean after each boot; can also be set as scheduled tasks, timing clear.

Photo caption: Save the file as a .bat

Caption: execution in operation: shell: Startup

Caption: Add to & ldquo; Start & rdquo; Folder < Br>

If you don't have time to manually create a file, you can also download the system directly to make a good file: network disk download

Of course, the commands mentioned above are only unilateral cleaning effects, if you want To thoroughly clean up junk files, you can refer to "How to clean up system garbage with one click? The code in .

Copyright © Windows knowledge All Rights Reserved