Tuesday, September 15, 2009

By Cleaning Temporary Files

Regularly removing files that accumulate in the Temp folder can also show better performance—
these files are usually very small and unnecessarily fill up the hard
disk. This also causes high disk fragmentation and pushes important data towards the periphery of the
disk, where read/write operations are slower. Ideally, create a batch file that empties this folder and place it in the
Startup, so that it runs every time you boot to Windows.
You could do this from the autoexec.bat too, but this file runs while still in DOS mode, so disk access will be much
slower than when in Windows.
You should strip all file attributes before running the delete command, since hidden and system files will not
be deleted from the Command Prompt. Also, using the deltree command instead of
del will ensure that even folders are deleted. Thus, your batch file should contain the
following commands:
attrib -a -s -r -h c:\Windows\
Temp\*.* /s
Deltree/y C:\Windows\
Temp\*

No comments:

Post a Comment