Question

Locked

Cleanup of *.tmp files on shared network storage Windows SBS 2003

By bblaha ·
Is there a tool that finds and removes old *.tmp files on a shared network store?

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

G-Lock Tools Temp Cleaner

by bincarnato In reply to Cleanup of *.tmp files on ...

It's Free and can remove several different types of files.
http://www.glocksoft.com/temp_cleaner/

Collapse -

G-Lock

by bblaha In reply to G-Lock Tools Temp Cleaner

Thank you for the tip.

Collapse -

Could Modify This

by rkuhn In reply to Cleanup of *.tmp files on ...

Change a few variable and away you go. You could even schedule it through the Task Scheduler.

REM @echo off
REM - This script searches through each home directory for temporary internet files and deletes them.
REM - The script also empties the temp folder
REM - THese lines set the starting directory for the script

set HDRIVE=c:
set HPATH=Documents and Settings

%HDRIVE%
cd \%HPATH%


REM - This line sets up the loop for the script
for /d %%i in (*) do call :ifthen %%i

goto end

REM - These lines check for the presence of the temporary internet file directories and call subroutines to deal with them.
:ifthen

if exist "%HDRIVE%\%HPATH%\%1\Local Settings\Temporary Internet Files\Content.IE5" call :ContentDelete1 %1
if exist "%HDRIVE%\%HPATH%\%1\windows\Temporary Internet Files\Content.IE5" call :ContentDelete2 %1
if exist "%HDRIVE%\%HPATH%\%1\Local Settings\temp" call :TempDelete %1
if exist "%HDRIVE%\%HPATH%\%1\cookies" call cookiesdelete %1
goto :EOF


REM - This subroutine removes all folders located in the user's "Profile\Local Settings\Temporary Internet Files\Content.IE5"
REM - directory (in their home directory). It then returns back to the line that it was called from.
:ContentDelete1

cd "%HDRIVE%\%HPATH%\%1\Local Settings\Temporary Internet Files\Content.IE5"
if exist "%HDRIVE%\%HPATH%\%1\Local Settings\Temporary Internet Files\Content.IE5" for /d %%n in (*) do rd /s /q "%%n"
if exist "%HDRIVE%\%HPATH%\%1\Local Settings\Temporary Internet Files\Content.IE5" del /q "%HDRIVE%\%HPATH%\%1\Local Settings\Temporary Internet Files\Content.IE5\*"
goto :EOF

REM - This subroutine removes all folders located in the user's "windows\Temporary Internet Files\Content.IE5" directory located
REM - in their home directory. It then removes all subfolders from this directory.
:ContentDelete2
cd "%HDRIVE%\%HPATH%\%1\windows\Temporary Internet Files\Content.IE5"
if exist "%HDRIVE%\%HPATH%\%1\windows\Temporary Internet Files\Content.IE5" for /d %%n in (*) do rd /s /q "%%n"
if exist "%HDRIVE%\%HPATH%\%1\windows\Temporary Internet Files\Content.IE5" del /q "%HDRIVE%\%HPATH%\%1\windows\Temporary Internet Files\Content.IE5\*"

goto :EOF

REM - This subroutine removes all folders located in the user's "windows\Temporary Internet Files\Content.IE5" directory located
REM - in their home directory. It then removes all subfolders from this directory.
:TempDelete
cd "%HDRIVE%\%HPATH%\%1\Local Settings\Temp"
if exist "%HDRIVE%\%HPATH%\%1\Local Settings\Temp" for /d %%n in (*) do rd /s /q "%%n"
if exist "%HDRIVE%\%HPATH%\%1\Local Settings\Temp" del /q "%HDRIVE%\%HPATH%\%1\Local Settings\Temp\*"

REM - This subroutine removes all folders located in the user's "cookies" directory located
REM - in their home directory. It then removes all subfolders from this directory.
:cookiesdelete
cd "%HDRIVE%\%HPATH%\%1\cookies"
if exist "%HDRIVE%\%HPATH%\%1\cookies" for /d %%n in (*) do rd /s /q "%%n"
if exist "%HDRIVE%\%HPATH%\%1\cookies" del /q "%HDRIVE%\%HPATH%\%1\cookies\*"

goto :EOF

:end

Back to Storage Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums