How does WinXP automatically clean up the Temp folder to improve system speed

  

The Temp folder in WinXP is also the temporary folder of the system. It mainly stores temporary files that are usually generated. If you do not clean them in time, they will accumulate more and waste disk space. It will cause disk fragmentation in the system, which affects the read and write speed of the system. How do I clean up these Temp folders? Maybe you will clean them up with software, but the software itself will also cause the Temp folder to pile up, so we should also learn to clean it manually.

Automatic cleaning method:

1. Create D:\\UserData\\TEMP directory on the D drive

02. Right click on "My Computer", "Properties","Advanced", open the "Environment Variables" dialog box, change user variables and system variables to D:\\UserData\\TEMP.

03. Create a new text document and write two lines of code in it:

RD %TEMP% /S/Q

MKDIR %TEMP%

Then save it as *.bat format (such as CleanTEMP.bat), so that just open the CleanTEMP.bat file will automatically empty the mess under the Temp folder.

04. After the above three steps, we can actually clear those temporary files, but we can't satisfy them. Our goal is to let Windows automatically empty and free our hands:

Open Group Policy (run gpedit.msc), open “Computer Configuration - Windows Settings - Script (Startup/Shutdown)”, then open “Start” or “Shutdown”, the effect is the same, one is Clearing Temp when logging in is clearing when shutting down, here I choose “Shutdown”. Click “Add” Import the *.bat file you just made, click “OK” After everything is done.

Through the above operation, in the future, you only need to double-click the created .bat format file, WinXP system will automatically clean up the garbage under the Temp folder, which is more convenient than using third-party software.

Copyright © Windows knowledge All Rights Reserved