Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Yes...
I have writtin a tutorial about this If you like follow the tutorial or email me and I'll make the files for you.You'll need the file called DELTREE.exe
if you can't find it let me know and I'll send it to you.My tutorial cleans on every boot up or just by calling it by the run menu
Junk Internet Explorer,
Get Firefox! You'll be happy you did.

Sorry bad link..
BuzzStPoint Temp file cleanup.
Junk Internet Explorer,
Get Firefox! You'll be happy you did.

The script is easy for me to understand, but do I have to make any changes due to the fact that the MY DOCUMENTS folder is located on a different partition than my OS?

Buzz and I are aware of this issue. You can either wait for Buzz to send you a modified batch file or you open the file into notepad and change the paths accordingly.
i_XpUser

Hi there,
I use Crap Cleaner (ccleaner.exe)
it will do just that and much much more. You can select and deselect what it should clean. The default setting is safe.
It's a free little app and damn fast.Peter

XPUser, sure I'll wait for Buzz to send me a link. That would really help. I am new to batch file creation.
Peter, Crap Cleaner looks great, but I want something that will run on system shutdown automatically.
Thanks everyone,
maf6373

Such routines could be run for dos/'9x. However I don't think you can run it/them (or much else either...?) at shutdown (unlike dos/'9x). At least that was the conclusion some of my colleagues at work reached when considering a similar routine for NT4/W2K a while back.
I posted a query here to re' this idea at the time (a couple of years back?) and the conclusion was similar - it couldn't be done?
Which having said I have a faint recollection of an add-in util that may allow it (for W2K at least - and presumably XP); but in a commercial arena it wasn't considered a viable route (licensing/money etc...).
If it is possible I'd very interested to know how etc.
It can be done at log-on as that's where batch-files are frequently invoked/used?

This script can be ran at startup and shutdown before the user logs on or right after the user logs off.
I am aware of the issue of the changing of the profiles and am working on it.. I should have it done this weekend.
If you only changed the "My Documents" folder then you need not to worry. Changing this folder doesn't change the temp file locations.
Junk Internet Explorer,
Get Firefox! You'll be happy you did.

the file change is only if you changed the location of the temproary internet files.
However I am changing the batch to include such routines to locate and delete.
Junk Internet Explorer,
Get Firefox! You'll be happy you did.

Buzz,
I created the BAT file as per the instuctions on your link, but the history folder did not get cleared, nor did the cookies folder. Here is the BAT file that I have created. It clears everything except the history folder. Let me know what you think.
TITLE Disk Cleanup
CLS
C:
CD "C:\Documents and Settings\username\Local Settings\Temp"
DEL /q /s /f *.*CD "C:\Documents and Settings\username\Local Settings\Temporary Internet Files"
DEL /q /s /f *.*CD "C:\Documents and Settings\username\Cookies"
DEL /q /s /f *.*CD "C:\Documents and Settings\username\Local Settings\History"
DEL /q /s /f *.*EXIT

"BuzzStPoint"
Thanks for the follow-on to my thoughts...
You say the routine will run at start-up and shutdown. I'm presuming it runs both times automatically? Getting a routine to run at startup (log-on) is OK; it's at shutdown (log-off) where it seemed to be unachieveable in my/our earlier attempt?
I'll await your further details as this routine may yet be one I/we might use (at shutdown/log-off).

The DEL command in my book is ineffective. that is why I use the deltree command.. Much stronger tool. You will need to download this file.
I see no sence in clearing on shutdown and start up.
I have mine set to clear on start up.. If you have more that 1 user when you turn on your pc, the files clear just before you logon. The way I expain how to do it, no files are in use so they get deleted.
also your temp files and TIF folder can be quite large.. It's much easier to delete the whole directory as a whole, then 1000 internet files..
I have the code written and is proven to work. I have a pc at work that has 9 users on it.. All temp files are cleared nightly, automatically. If you use my code and alter it I cant say it will work..
As for the people that have changed the location of the the temp files, I am working on the solution and will have it done this weekend.
Junk Internet Explorer,
Get Firefox! You'll be happy you did.

maf6373
follow the instructions carefully..
Where the "username" is. You need to change that to your username on your computer. Also like I said above. The DEL command is only good for a few files. Th DELTREE command is stringer and will remove the whole folder.
Junk Internet Explorer,
Get Firefox! You'll be happy you did.

"Buzz.....":
Yes, clearing it all at log-on is what we accepted; especially as we were unable to get it to work at log-off (it appeared to be a stanrdard/normal no-go for the NT family). Also at log-off "was" the original goal, as it was thought that doing it at log-on would (marginally?) extend log-on time...?
Doing it at log-on is pretty straightforward...?

If you are running XP pro you will set this in the gpedit. Follow my instruction.. There you will see the Start up and shut down.
It wont clear the file at "log Off" but on shutdown.
I'm sure there is a way to make them clear at "Log Off" As soon as I finish the batch for the profiles I'll tear deaper in the registry and see if there is a way.
Junk Internet Explorer,
Get Firefox! You'll be happy you did.

"Buzz...."
Hi again:
If you do manage it at log-off I think it will be widely applauded. We (colleagues et moi) did a lot of research and couldn't find any way to get it work that way. All references indicated scripts/batch-files etc. were (would) run at log-on only...?
The shutdown option is a viable alternative in some (of our) situations. Our requirement was at log-off, as to go thru' a full shutdown and restart was not always viable. The main PCs involved are in a live to-air broadcast environment; and the quick/fast change of users (on-air talent and assorted production staff) at various times demands a minimum log-off/on time (and true shutdown and subsequent reboot obviously takes a little longer)...
Again thanks thus far your info/input.

Trvlr
Shoot me an email. Click my name above..
I'll email you when I get a chance and let you know the outcome.
Junk Internet Explorer,
Get Firefox! You'll be happy you did.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |