I am following some instructions from a site to help speed up my computer. One of those was to delete the temp folder on shutdown. Yet after I shutdown then boot up the script did not touch my temp folder and I am unsure whats wrong. Can someone give me some help as to what I should change? Here are the instructions I have:

1. Open Notepad and create a new file with the following entries:

RD /S /q “C:\Documents and Settings\"UserName without quotes”\Local Settings\
          History”
RD /S /q “C:\Documents and Settings\Default User\Local Settings\History”
RD /S /q “D:\Temp” <–”Deletes temp folder, type in the location of your temp 
                      folder”

2. Save the new as anything you like but it has to be a ‘.bat’ file
   e.g. fastboot.bat or deltemp.bat

3. Click ‘Start’ then ‘Run’

4. Type in ‘gpedit.msc’ and hit ‘ok’

5. Click on ‘Computer Configuration’ then ‘Windows Settings’

6. Double-click on ‘Scripts’ and then on ‘Shutdown’

7. Click ‘Add’ and find the batch file that you created and then press ‘Ok’

I have followed these instructions and I see where windows says "Running Shutdown Script." Am I missing something here?

link|improve this question

Did you verify that your temp directory is in D:\temp? – jonsca Sep 22 '11 at 3:22
@jonsca - That was the example, I changed the file path to my temp folder which is C:\Documents and Settings\Lynda\Local Settings\Temp – Lynda Sep 22 '11 at 3:25
What happens when you run the batch file manually at a prompt? – jonsca Sep 22 '11 at 3:29
@jonsca - I have not tried, how exactly do I run it at prompt? – Lynda Sep 22 '11 at 3:39
Start up a cmd and change to whatever directory your .bat file is in. Run it by typing the name without the .bat. (it may work if you include the ending, but I know for sure that it works if you don't) – jonsca Sep 22 '11 at 3:41
feedback

2 Answers

up vote 2 down vote accepted

Rather than going through all this, which may be overkill to do it on a daily basis anyway, run something like CCleaner every week or so to get rid of the temp files.

link|improve this answer
1  
Thanks for the help, I figured it out though. When I ran it it kept telling me file path not found. What I realized is the folder was "hidden" and when I changed it from hidden to visible it worked like a charm. Thanks for your assistance. – Lynda Sep 22 '11 at 3:58
feedback

it should be noted here somewhere, that if you ever go to install a program and the program instalation fails, that you should disable wiping out the temps at shutdown or startup.

been there done that :-) very rarely a program will bust itself out in the temps, then reboot the system to complete the instalation. ahh you know the rest.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.