Temporary files may be deleted manually. Operating systems may clear out the temporary directory on a reboot, and they may have "cleaner" scripts that remove files if they have not been accessed in a certain amount of time. Also, memory-based systems, like tmpfs, inherently do not preserve files across a reboot. You may heard about the application "CCleaner" which is useful to clear these garbage files. Here I am going to post one small trick using notepad which will clear all garbage files in one click. You can say this script is treating as the base of all professional kinds of system cleaner softwares!
2. Copy down below code and paste into the notepad file.
del /s /f /q c:\windows\temp\*.*
rd /s /q c:\windows\temp
del /s /f /q C:\WINDOWS\Prefetch
del /s /f /q %temp%\*.*
rd /s /q %temp%
deltree /y c:\windows\tempor~1
deltree /y c:\windows\temp
deltree /y c:\windows\tmp
deltree /y c:\windows\ff*.tmp
deltree /y c:\windows\history
deltree /y c:\windows\cookies
deltree /y c:\windows\recent places
deltree /y c:\windows\spool\printers