A Windows batch file is a type of text file, which contains a series of commands for a computer's operating system. You should not open batch files on your hard disk that are unknown as they contain executable commands. The file extension for batch file is .BAT. The Temp files (Temporary files) are created by system programs essentially when the programs cannot get the appropriate level of memory to complete a task. Using batch files you can view, access and erase the content of the temporary files as you would do in the Command prompt by typing a specific set of commands.
A batch file to delete temp users files
I'm trying to create a batch file to clean my business PC (such as the contents of Temp files and Temporary Internet Files for each user...)
This script deletes all files in
- C:\Documents And Settings\<UserName>\Local settings\Temp and
- C:\Documents And Settings\<UserName>\Local settings\Temporary Internet Files
cd /d %temp%
for /r %%a in (*.*) do (
del /f /q %~a
cd /d "%UserProfile%\Local Settings\Temporary Internet Files
for /r %%b in (*.*) do (
del /f /q %~b
Thanks to theo7777 for this tip.
In the same category
Published by deri58
- Latest update by Virginia Parsons