Thursday, March 1, 2018

Clear Temp Files, Folders, Cookies

Clear Temp Files and Folders


Here we are going to see the commands used to clear all the temporary files and empty folders.
While using system continuously we will end up in creating huge number of temporary files.
This will slow down the system which will result in slow response of the system and time taken for opening an application will be more

del /q /s  "c:\winnt\temp\*.*"
del /q /s  "c:\windows\temp\*.*"
del /q /s  "%USERPROFILE%\Local Settings\Temp\*.*"
del /q /s  "%USERPROFILE%\Local Settings\Temporary Internet Files\*.*"
del /q /s  "%USERPROFILE%\Cookies\*.*"

Remove Directory:

This is optional command. It is not mandatory to run the below command. The above command holds good.

Rmdir /q /s "%USERPROFILE%\Local Settings\Temporary Internet Files"
Rmdir /q /s "%USERPROFILE%\Local Settings\Temp"
Rmdir /q /s "%USERPROFILE%\Cookies\*.*"
Rmdir /q /s "c:\winnt\Temp"
Rmdir /q /s "c:\windows\Temp"



Make Directory:

This is optional command. It is not mandatory to run the below command.  These commands should be run only when all rmdir is executed. 

md  "%USERPROFILE%\Local Settings\Temporary Internet Files"
md  "%USERPROFILE%\Local Settings\Temp"
md  "%USERPROFILE%\Cookies"
md  "c:\winnt\Temp"
md  "c:\windows\Temp"

Thanks! for reading the post. Hope this is helpful.

No comments:

Post a Comment