This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
computing:windows:del_temp [2013/04/17 12:59] gcooper created |
computing:windows:del_temp [2013/07/18 14:17] (current) gcooper |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Delete Temporary Files ====== | ====== Delete Temporary Files ====== | ||
- | This script will delete various temporary files and folders | + | ===== Windows XP, Vista, 7 ===== |
+ | |||
+ | Delete temp files for all users: | ||
+ | |||
+ | < | ||
+ | @echo off | ||
+ | |||
+ | IF EXIST c: | ||
+ | |||
+ | DEL /f /s /q %temp%\ | ||
+ | |||
+ | IF EXIST " | ||
+ | for /D %%x in (" | ||
+ | del /f /s /q " | ||
+ | del /f /s /q " | ||
+ | ) | ||
+ | ) | ||
+ | |||
+ | IF EXIST " | ||
+ | for /D %%x in (" | ||
+ | del /f /s /q " | ||
+ | del /f /s /q " | ||
+ | ) | ||
+ | ) | ||
+ | </ | ||
+ | |||
+ | ===== Terminal Server (RDS) Script ===== | ||
+ | |||
+ | http:// | ||
+ | |||
+ | FIXME This script | ||
+ | |||
+ | < | ||
+ | :: Hide Commands | ||
+ | @echo off | ||
+ | setlocal EnableExtensions | ||
+ | |||
+ | :: Parse the Local AppData sub path | ||
+ | call :Expand xAppData " | ||
+ | |||
+ | set " | ||
+ | set " | ||
+ | |||
+ | :: Start at the User directory | ||
+ | pushd " | ||
+ | |||
+ | :: Loop through the Users | ||
+ | for /D %%D in (*) do if exist " | ||
+ | rem Check for Firefox | ||
+ | if exist " | ||
+ | pushd " | ||
+ | |||
+ | rem Loop through the Profiles | ||
+ | for /D %%P in (*) do ( | ||
+ | if exist " | ||
+ | ) | ||
+ | popd | ||
+ | ) | ||
+ | |||
+ | rem Check for Chrome | ||
+ | if exist " | ||
+ | pushd " | ||
+ | |||
+ | rem Loop through the Profiles | ||
+ | for /D %%P in (*) do ( | ||
+ | if exist " | ||
+ | ) | ||
+ | popd | ||
+ | ) | ||
+ | ) | ||
+ | popd | ||
+ | goto End | ||
+ | |||
+ | |||
+ | :::::::::::::::::::::::::::::: | ||
+ | :Expand < | ||
+ | if not " | ||
+ | goto :eof | ||
+ | |||
+ | |||
+ | :End | ||
+ | endlocal | ||
+ | pause | ||
+ | </ | ||
+ | |||
+ | ===== Logoff Script ===== | ||
+ | |||
+ | http:// | ||
+ | |||
+ | This batch file will delete various temporary files and folders | ||
< | < |