Monday, February 18, 2013

Batch File to Clean Temp Folder

It is necassary sometimes to clean temporary files because they can waste large amount of space on your system drive. You can download one of system cleaners or even pay to its developer. But you should be aware of different kinds of malware in these cleaners. It is much better to use a simple batch script like this:
REM ********************************************
REM * Cleaning example script *
REM ********************************************
REM * This script shows how to clean the folder*
REM * from temporary files *
REM ********************************************
REM This string specifies that no details will be shown
@ECHO off
REM Change current forder to the temp folder
CD TEMP
REM Delete all files with extension starting with ~
DEL *.~*
REM Delete all files with extension TMP
DEL *.tmp
REM Add your extensions!
ECHO Press Enter!
PAUSE
EXIT
Hope this script is quite simple and you can understand what it does from the comments, but if you have any questions you are always welcome. Leave comments under this post or send a letter to support@m-w-c-s.com.
Want to learn how to create batch file? Subscribe our RSS feed!

No comments:

Post a Comment

Translate