How to set up win7 to automatically clean up temporary junk files when shutting down

  

The computer will continuously generate a large number of system files and temporary junk files during use. If these files are not cleaned up in time, they will not only occupy a large amount of system disk space, but also directly affect the running speed of the system, but many Users ignore the cleanup of the computer before using the computer, and the computer becomes slower and slower over time.

In fact, we can set the computer to automatically clean up temporary files when it is shut down, so the computer will not accumulate a large number of temporary junk files. Let's take a look at the operation method of Win7 shutdown to automatically clean up temporary files.

Step 1: Create a .bat file that automatically cleans up temporary files.

1. Start - All Programs - Accessories - Notepad;

2. In the open notepad, type: del folder path /q, left click on the file, in the drop down menu Left click: Save as;

3. In the Save As window, click: Desktop, in the File Name (N) field, enter: Temporary File Cleanup.bat, then click: Save.

Tips for automatically cleaning temporary junk files when the computer is turned off

Step 2: Add the temporary file cleanup .bat file to the script shutdown file.

1. Start - Run (enter gpedit.msc) - OK or Enter to open the Local Group Policy Editor;

2. In the Open Local Group Policy Editor window, expand : Computer Configuration - Windows Settings - Script (Start /Shutdown), left-click on the right side of the window to shut down;

3, in the shutdown properties window that opens, click: Add;

4, In the Add Script window, we click: Browse;

5. In the open desktop, find: Temporary file cleanup.bat, and double-click: Temporary file cleanup.bat;

A temporary file cleanup .bat file has been added, click: OK;

7. Return to the shutdown properties window and click: Apply - OK.

Create a .bat file that automatically cleans up temporary files, so that this file will run automatically when the computer is turned off, then the computer's temporary junk files will be automatically cleaned up. This is also a must-have skill for lazy people.

Copyright © Windows knowledge All Rights Reserved