WinXP how to automatically clean the Temp folder

  

WinXP Temp folder is also the system's temporary folder, mainly to store some temporary files generated, these temporary files will accumulate more if you do not clean up in time , wasted disk space, will also cause disk fragmentation of the system, affecting the system's read and write speed. 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. establish D in the D: \\ UserData \\ TEMP directory

02. Right-click " 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