Win7/8/10 system automatically clears temporary file garbage when shutting down

  

Regardless of the operating system, there will be a lot of temporary files in the computer during the operation. If it is not cleared in time, the boot speed and system running speed will be slowed down, but we don't necessarily remember to clear it before shutting down. Some often shut down before remembering that the temporary file garbage is not cleared. Is there any way to automatically clear the computer during the operation? What is the temporary file garbage left in?

Tools/Materials

Hardware: Computers

Operating System: Windows7/8/10

Methods/Steps

How to automatically clear temporary files when Windows 7/8/10 system is shut down

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

Steps:

Start - All Programs - Accessories - Notepad;

In the open notepad, type:del folder path /q , left button Click on the file and left click in the drop-down menu: Save As;

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

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

Steps:

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

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 close the shutdown;

In the shutdown properties window, click: Add;

In the Add Script window, we click: Browse;

Find in the open desktop: Temporary file cleanup.bat, and left click double: Temporary file cleanup. Bat;

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

Go back to the shutdown properties window and click: Apply - OK.

With the above settings, the Windows 7/8/10 system will automatically clear the temporary files left during the operation.

For friends to refer to and use.

The above is the introduction of the method of automatically clearing the temporary file garbage when the Win7/8/10 system is shut down. I hope it will help everyone!

Copyright © Windows knowledge All Rights Reserved