User Tools

Site Tools


computing:windows:del_temp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
computing:windows:del_temp [2013/04/17 13:10]
gcooper
computing:windows:del_temp [2013/07/18 14:17] (current)
gcooper
Line 1: Line 1:
 ====== Delete Temporary Files ====== ====== Delete Temporary Files ======
 +
 +===== Windows XP, Vista, 7 =====
 +
 +Delete temp files for all users:
 +
 +<file>
 +@echo off
 +
 +IF EXIST c:\windows\temp\ del /f /s /q c:\windows\temp\
 +
 +DEL /f /s /q %temp%\
 +
 +IF EXIST "C:\Users\" (
 +    for /D %%x in ("C:\Users\*") do ( 
 +        del /f /s /q "%%x\AppData\Local\Temp\" 
 +        del /f /s /q "%%x\AppData\Local\Microsoft\Windows\Temporary Internet Files\" 
 +    )
 +)
 +
 +IF EXIST "C:\Documents and Settings\" (
 +    for /D %%x in ("C:\Documents and Settings\*") do ( 
 +        del /f /s /q "%%x\Local Settings\Temp\" 
 +        del /f /s /q "%%x\Local Settings\Temporary Internet Files\" 
 +    )
 +)
 +</file>
  
 ===== Terminal Server (RDS) Script ===== ===== Terminal Server (RDS) Script =====
  
 http://stackoverflow.com/questions/14071021/batch-file-to-delete-firefox-cache-for-user-profiles-on-terminal-server http://stackoverflow.com/questions/14071021/batch-file-to-delete-firefox-cache-for-user-profiles-on-terminal-server
 +
 +FIXME This script did not work on Server 2003
  
 <file> <file>
computing/windows/del_temp.1366225850.txt.gz · Last modified: 2013/04/17 13:10 by gcooper