Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I have this little program that I got from the net somewhere that is called clean.bat. I really like what it does, cuz it cleans all of the temp folders and history and swap files all the one double click of the mouse. I have been playing around with it for the past few days because I would like to modify it a bit. I want it to include the drop down history in internet explorer. Also, it is running a program called SMARTdrv.exe. I am really wondering what this is. Can anyone tell me what SMARTdrv.exe is and what it does. It will only run in DOS. Thanks for your help.
Here is what the clean program looks like.
c:\windows\smartdrv
deltree /y c:\windows\tempor~1
deltree /y c:\windows\temp
deltree /y c:\windows\tmp
deltree /y c:\windows\ff*.tmp
deltree /y c:\windows\history
deltree /y c:\windows\cookies
deltree /y c:\windows\recent
deltree /y c:\windows\spool\printers
deltree /y c:\windows\WIN386.SWP
exit

Someone is bound to provide a definition but in practice without it the DOS program will run very slowly.

do a smartdrv /? at a prompt. It is a disk cache software used for speeding up some processes like installs.
Your batch process doesn't look right to me. You are removing the directories like c:\windows\temp instead of just deleting files contained in those directories. There is no c:\windows\tmp unless you made one.
Some of these directories are not recreated by the system like c:\windows\temp.
Your batch should be like this:
cd c:\windows\temp
delete *.tmp /y
cd windows blah blah blahI would highly suggest you checkout ramdrive.sys. You can create a drive letter out of ram. You then direct all your temp files etc to this drive letter. When you shutdown or reboot the machine they are all gone because ram memory was cleared. This technique also speeds up printing since spooling is done to ram not the hard drive.

If you don't use deltree, then any subdirectories within that folder will not be deleted.
And, on Win98 the Temp folder is recreated.Also, an observation: Why are you deleting the swapfile? This does not serve any useful purpose.

May I be cheeky and answer a question you didn't ask? It's how to delete the typed URL's in IE (I assume I've understood you correctly).
This is contained in the registry and cannot be deleted by using a batch file on it's own. You need to write a .reg file and Save it as such from NotePad. It goes like this (between the lines below):
================================
REGEDIT4[-HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TypedURLs]
================================
This should be all on one line with a space between Internet and Explorer (the posting put in the Return). You have to include one Return at the end of the line. Give it a name such as typurl.regThis will run in it's own right but has an annoying screen to answer each time. This is where an addition to your batch file
comes in. Put in this extra line:regedit /s typurl.reg
It will then call it up as part of the batch file if it's put in the same folder.
By the way, batch files are different, you don't put a Return at the end of them.
Note that the registry entry will re-appear each time you type another URL. If you want to play it safe, always best, then export and save the registry (or at least the above key) before you Run it. It works fine tho, I used this before I made other arrangements.

Just a minor point about your batch file. Try it with cls at the end instead of exit (no Return remember). This will stop it hanging with the black DOS screen when it finishes running.

.... sorry just remembered, you have smartdrive running so in my #6 you may have to leave exit there and "add" cls (I don't use smartdrive so I've never tried with that command present)....

THANK YOU ALL so very much. This is some very very nice information to work on my little program with.

Derek.
You gave me alot to work with here and try to modify my batch file. You are completely correct to assume that I wanted to clear out the url's from the drop down list in internet explorer.
I am following your instructions as to making a notepad file, but where am I saving this notepad to? I understand what to save it as, and what to put in it, but where am I saving it to? Thanks so much.
Andrew.

Yes, in the same folder. Looks like you may have missed this bit in my posting:-
"It will then call it up as part of the batch file if it's put in the same folder"If you just double click the .reg file it will work but you have to do a yes/no style confirmation each time. If the batch file calls it up with that "/s" switch then it will just do it without bothering you. It's like the "/y" switches after your deltree's.

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

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