Empty Temp folder on LogOff


Go Back   Computer Help Articles > Windows XP General
User Name
Password
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-05-2006, 02:32 AM
Michael Tissington
 
Posts: n/a
Default Empty Temp folder on LogOff

How can I automatically empty the contents of my Temporary folder when I
logoff ?

(I'm not talking about Tempory Internet Files)

--
Michael Tissington
http://www.oaklodge.com
http://www.sqlview.net


Reply With Quote
  #2  
Old 01-05-2006, 02:32 AM
Wesley Vogel
 
Posts: n/a
Default Re: Empty Temp folder on LogOff

Make a batch file with the following


cd %tmp%
del /q *.*
cd %windir%\temp
del /q *.*


And place the batch file or a shortcut in
%windir%\system32\GroupPolicy\Machine\Scripts\Shut down

Or place a shortcut to the batch file in
%homepath%\Start Menu\Programs\Startup
to clean out the temp files on boot.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In news:OGAPRU$DGHA.2912@tk2msftngp13.phx.gbl,
Michael Tissington <mtissington@newsgroups.nospam> hunted and pecked:
> How can I automatically empty the contents of my Temporary folder when I
> logoff ?
>
> (I'm not talking about Tempory Internet Files)
>
> --
> Michael Tissington
> http://www.oaklodge.com
> http://www.sqlview.net

Reply With Quote
  #3  
Old 01-05-2006, 02:33 AM
Unk
 
Posts: n/a
Default Re: Empty Temp folder on LogOff

On Mon, 2 Jan 2006 15:34:24 -0800, "Michael Tissington" <mtissington@newsgroups.nospam> wrote:

>How can I automatically empty the contents of my Temporary folder when I
>logoff ?
>
>(I'm not talking about Tempory Internet Files)


Shutdown/Shutdown script (XP Pro only):

Double-click "My Computer", double-click the C:\ drive.
Right-click a blank area, select "New Text Document". Double-click the "New Text Document.txt"
Copy & paste the below into the text file: (Change "C:\Temp" to the location of YOUR temp folder)

rd /s /q C:\Temp
md C:\Temp

Save the file, then rename it to deltmp.bat

NOTE "rd" removes the entire tree "C:\Temp" and ALL it's contents (including subdirectories)
NOTE "md" recreates the tree (empty)


Click Start, Run and enter GPEDIT.MSC
Go to Computer Configuration, Windows Settings, Scripts, Shutdown.
Browse to the location you saved the "deltmp.bat" file, and select it.



Reply With Quote
  #4  
Old 01-05-2006, 02:33 AM
Michael Tissington
 
Posts: n/a
Default Re: Empty Temp folder on LogOff

Thanks

--
Michael Tissington
http://www.oaklodge.com
http://www.sqlview.net

"Unk" <not@aol.com> wrote in message
news:95hjr1l3pbr84vlkr1h561bfa1go4v4bdb@4ax.com...
> On Mon, 2 Jan 2006 15:34:24 -0800, "Michael Tissington"
> <mtissington@newsgroups.nospam> wrote:
>
>>How can I automatically empty the contents of my Temporary folder when I
>>logoff ?
>>
>>(I'm not talking about Tempory Internet Files)

>
> Shutdown/Shutdown script (XP Pro only):
>
> Double-click "My Computer", double-click the C:\ drive.
> Right-click a blank area, select "New Text Document". Double-click the
> "New Text Document.txt"
> Copy & paste the below into the text file: (Change "C:\Temp" to the
> location of YOUR temp folder)
>
> rd /s /q C:\Temp
> md C:\Temp
>
> Save the file, then rename it to deltmp.bat
>
> NOTE "rd" removes the entire tree "C:\Temp" and ALL it's contents
> (including subdirectories)
> NOTE "md" recreates the tree (empty)
>
>
> Click Start, Run and enter GPEDIT.MSC
> Go to Computer Configuration, Windows Settings, Scripts, Shutdown.
> Browse to the location you saved the "deltmp.bat" file, and select it.
>
>
>



Reply With Quote
  #5  
Old 01-05-2006, 02:33 AM
Ramesh, MS-MVP
 
Posts: n/a
Default Re: Empty Temp folder on LogOff

Michael,

See also:

Alter the "LastAccess" value for cleaning the Temporary files using Disk
Cleanup utility:
http://windowsxp.mvps.org/cleantemp.htm

--
Ramesh, Microsoft MVP
Windows XP Shell/User

Windows XP Troubleshooting
http://www.winhelponline.com


"Michael Tissington" <mtissington@newsgroups.nospam> wrote in message
news:uPpblGDEGHA.1028@TK2MSFTNGP11.phx.gbl...
Thanks

--
Michael Tissington
http://www.oaklodge.com
http://www.sqlview.net

"Unk" <not@aol.com> wrote in message
news:95hjr1l3pbr84vlkr1h561bfa1go4v4bdb@4ax.com...
> On Mon, 2 Jan 2006 15:34:24 -0800, "Michael Tissington"
> <mtissington@newsgroups.nospam> wrote:
>
>>How can I automatically empty the contents of my Temporary folder when I
>>logoff ?
>>
>>(I'm not talking about Tempory Internet Files)

>
> Shutdown/Shutdown script (XP Pro only):
>
> Double-click "My Computer", double-click the C:\ drive.
> Right-click a blank area, select "New Text Document". Double-click the
> "New Text Document.txt"
> Copy & paste the below into the text file: (Change "C:\Temp" to the
> location of YOUR temp folder)
>
> rd /s /q C:\Temp
> md C:\Temp
>
> Save the file, then rename it to deltmp.bat
>
> NOTE "rd" removes the entire tree "C:\Temp" and ALL it's contents
> (including subdirectories)
> NOTE "md" recreates the tree (empty)
>
>
> Click Start, Run and enter GPEDIT.MSC
> Go to Computer Configuration, Windows Settings, Scripts, Shutdown.
> Browse to the location you saved the "deltmp.bat" file, and select it.
>
>
>




Reply With Quote
  #6  
Old 01-05-2006, 02:34 AM
RW
 
Posts: n/a
Default Re: Empty Temp folder on LogOff



On Mon, 02 Jan 2006 20:14:59 -0500, Unk <not@aol.com> wrote:

>On Mon, 2 Jan 2006 15:34:24 -0800, "Michael Tissington" <mtissington@newsgroups.nospam> wrote:
>
>>How can I automatically empty the contents of my Temporary folder when I
>>logoff ?
>>
>>(I'm not talking about Tempory Internet Files)

>
>Shutdown/Shutdown script (XP Pro only):
>
>Double-click "My Computer", double-click the C:\ drive.
>Right-click a blank area, select "New Text Document". Double-click the "New Text Document.txt"
>Copy & paste the below into the text file: (Change "C:\Temp" to the location of YOUR temp folder)
>
>rd /s /q C:\Temp
>md C:\Temp
>
>Save the file, then rename it to deltmp.bat
>
>NOTE "rd" removes the entire tree "C:\Temp" and ALL it's contents (including subdirectories)
>NOTE "md" recreates the tree (empty)
>
>
>Click Start, Run and enter GPEDIT.MSC
>Go to Computer Configuration, Windows Settings, Scripts, Shutdown.
>Browse to the location you saved the "deltmp.bat" file, and select it.
>
>



Beware that some software when first installed requires the temp files
on the first boot. Ask me how I know.
Reply With Quote
  #7  
Old 01-05-2006, 02:34 AM
Wesley Vogel
 
Posts: n/a
Default Re: Empty Temp folder on LogOff

I know how you know. Same way that I know. ;-)

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In news:3p3mr1pf64auclncm8sphbooqm0jtkd562@4ax.com,
RW <none@none.com> hunted and pecked:
> On Mon, 02 Jan 2006 20:14:59 -0500, Unk <not@aol.com> wrote:
>
>> On Mon, 2 Jan 2006 15:34:24 -0800, "Michael Tissington"
>> <mtissington@newsgroups.nospam> wrote:
>>
>>> How can I automatically empty the contents of my Temporary folder when I
>>> logoff ?
>>>
>>> (I'm not talking about Tempory Internet Files)

>>
>> Shutdown/Shutdown script (XP Pro only):
>>
>> Double-click "My Computer", double-click the C:\ drive.
>> Right-click a blank area, select "New Text Document". Double-click the
>> "New Text Document.txt" Copy & paste the below into the text file:
>> (Change "C:\Temp" to the location of YOUR temp folder)
>>
>> rd /s /q C:\Temp
>> md C:\Temp
>>
>> Save the file, then rename it to deltmp.bat
>>
>> NOTE "rd" removes the entire tree "C:\Temp" and ALL it's contents
>> (including subdirectories)
>> NOTE "md" recreates the tree (empty)
>>
>>
>> Click Start, Run and enter GPEDIT.MSC
>> Go to Computer Configuration, Windows Settings, Scripts, Shutdown.
>> Browse to the location you saved the "deltmp.bat" file, and select it.
>>
>>

>
>
> Beware that some software when first installed requires the temp files
> on the first boot. Ask me how I know.


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Deleting Empty Folders in ‘My Music’ Folder Galley Windows XP Music 0 01-05-2006 07:38 AM
Keeping backup of my pictures in my order Gladys222 Windows XP Photos 10 01-05-2006 07:08 AM
xp pro won't boot C:\WINDOWS folder is empty Jonathan Windows XP Perform Maintain 2 01-05-2006 05:59 AM
One-way connection: networked XP/2000 PC's Cheryl Windows XP Network Web 22 01-05-2006 04:11 AM
Folder View Donaldo Windows XP General 3 01-05-2006 02:35 AM


All times are GMT. The time now is 11:22 PM.


Powered by vBulletin Version 3.5.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd. SEO by vBSEO 2.3.2 © 2005, Crawlability, Inc.

Empty Temp folder on LogOff