Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
*** New St. Patrick’s Day Version of DELINDEX
This was previously posted on the WinME forum. This batch file should work in Win98, but since I don't have Win98 I can't be positive. However, I suspect that some of you can find a way to make it work.
DELINDEX is a DOS batch file that was originally created just to delete Index.dat files that contain ALL your web surfing history since they were (re)created. Here are 3 reasons to delete them: (1) They are never resized, and only get bigger. (2) Large index.dat files can cause performance problems when browsing. (3) To protect your privacy, so others cannot see where you’ve been on the Internet. (You’ll have to delete other files as well; some information is also stored in the registry about where you’ve been.)
Index.dat files are hidden, don't show up in searches (in Windows or DOS) and CANNOT be deleted when Explorer is running. DELINDEX was expanded in a version dated 2/14/02 to delete other files; notes and options were added as well. Unless you edit DELINDEX.BAT, these are your only options: delete the 4 Index.dat files and files in the C:\ (and C:\Windows\)Temp folders (the "LESS" option); OR delete those files and ALL these files/folders which are either unnecessary and/or are recreated by Windows (the "MORE" option):
* C:\Windows\Cookies (folder)
* C:\Windows\[Locals~1\]Temporary Internet Files (contents, except the Google
toolbar)
* C:\Windows\History (folder)
* C:\Windows\Windows Update (contents, except for the history log)
* C:\[My Documents\]My Pictures\Thumbs.db
* C:\Windows\ShellIconCache***IMPORTANT NOTE ABOUT IDs & PASSWORDS: Previously I thought deleting only the index.dat files and not the cookies themselves would preserve your IDs and passwords. Wrong! The index.dat file IS an index, and even though it may have thousands of listings for cookies that no longer exist, it is necessary for Explorer to locate the cookies that do exist. So, whether you use the LESS option or the MORE option, you will lose the ability to just go into sites (that require IDs and passwords) without signing in. If you delete the index, you might as well delete the cookies, since they can no longer function.
***Record IDs and passwords BEFORE using DELINDEX!***============================================================
Look here for the original DELINDEX post and discussion.
More on DELINDEX here, and the rationale for deleting some of the files.
*** NEW FEATURES ADDED IN THE MARCH 17, 2002 VERSION ***
•1. A display of free space before and after DELINDEX is run (with the MORE option only).
•2. More of the previously internal notes are displayed when you pick the “Additional Notes” option. (There are still some internal notes that can only be seen using the “View” option.)
•3. An “ADD” option that puts lines in the autoexec.bat file on your StartUp Disk to give you the option (every time you boot with the StartUp Disk) to run DELINDEX with NO options, the “MORE” option, the “LESS” option, or NOT to run it at all. This eliminates the need to do any editing of a:\autoexec.bat. The ADD option also loads Doskey. (This info was in the previous version as notes, so it was easy to convert the notes into this option.)
•4. Deletes copies (and backups) of the registry labeled “bad” if they exist. Sometimes using Scanreg /opt and/or Scanreg /fix (or ScanregW with the same
switches) can result in new copies of the registry being created, and the old ones being labeled classes.bad and/or user.bad and/or system.bad. Under some circumstances (?) a registry backup can also be labeled rbbad.cab. Any “bad” registry copies are now deleted with the MORE option.•5. Some notes were corrected, revised and/or added, some code cleaned up, and there’s less regard to limit line length to 78 characters, which makes some displays nicer, and some code simpler. (That does make a few lines wrap in the view option.)
This version is more than a hundred lines longer than the one posted 2/14/02. I’m almost embarrassed by that; but what makes DELINDEX what it is are the notes, the explanations, and the options. Whether you have 8 or 16KB clusters, this version still doesn’t take up any more space than the previous one.
Except for the display of free space, you really won’t SEE any difference between the 2/14/02 and the 3/17/02 versions.
============================================================
*** GETTING DELINDEX ***
The actual code is not posted, since it is available for viewing and download from here: http://briefcase.yahoo.com/delindex. However, on March 25, Yahoo will discontinue public access to briefcases unless you have a Yahoo! ID. So you can look at the code and download it from there until March 25th.
You can also get it at the website of ShutMeUpOrDown:)
ftp://ftp.burzurq.com/delindex/index.html
These is how he said he ran it:
1. I downloaded Delindex.bat to C:\.
2. I inserted a Windows ME StartUp disk and restarted the computer.
3. I chose option 3 “to start windows without cdrom support”.
4. At the A:\prompt I entered: C:\delindex.bat and pressed enter.
5. I followed the on screen instructions. (I chose the More option and watched it do its thing.)Enjoy the new DELINDEX!
============================================================
I’m more than happy to explain DELINDEX, but most of that has been done in prior posts (“Why did [or didn’t] you...,” “I think you should [or shouldn’t] have...,” yada, yada, yada). Deleting the index.dat files is simple. The ideas for deleting other files have been collected from this forum, PC World, other “cleanup” utilities, and my own experience. All this batch file does is to give you notes and options, and to combine a whole lot of things into one convenient package. NO WHINING, PLEASE! I’m not going to defend DELINDEX. If you do not like the batch file, modify it. Or don’t download it. If you have questions that are NOT covered in (WinME) posts 19918 or 20337, please post them here and I’ll gladly answer them as best I can. If you post the same questions, I’ll leave them for others to answer. Of course I welcome suggestions to improve DELINDEX.
Should there be any problems with this version, please post back here (on this thread) ASAP; if there’s a problem with the batch file, I’ll fix it immediately. I’ve been using this new version on my system for more than two weeks now, with no problem.
============================================================
For information on Index.dat files, look at these posts:
95/104366
ME/20164
ME/19944FYI:
DELINDEX; less than 16KB; free; requires StartUp Disk
Wash from 12 Ghosts; 600KB; $13
History Kill; 1.77MB; $40; memory resident
Cache and Cookie Washer; 1.4MB; $15
Window Washer, 1.4MB, $30
Spider; 635KB; free; (It reads index.dat files very well, but on my system it only deletes the one in the cookies folder.)

Cool! I look forward to using it. We have been waiting since your previous announcement for the program.But I have a question. Can removing(or the contents of)the index.dat files make the Back and Forward buttons in my Netscape browser not function?
I modified the contents of a couple of the index.dat files(that would let me) and those functions do not work now. The buttons are still there, but do not function anymore.
Could there be a relation?

I don’t know. My guess is that the index.dat files have nothing to do with your problem, unless a programer puts part(s) of the program in the Temporary Internet Files folder. I think it’s stupid, but some programs and websites put bits and pieces in the Temporary Internet Files folder (Google, PC Pitstop, among others).
If Netscape puts pieces in of its program in TIF or cookies, deleting or tinkering with index.dat files could cause a problem. But people have done dumber things than that. Forgive my cynicism, but I’m not surprised by too much any more.
============================================
Expect nothing; live frugally on surprise. (Alice Walker)

I am a relative newcomer to computers and the techie world so my thoughts are .......Damn u people here are good!!! f---..... ooops!!! I got a lot to learn!!!

Just one thing. Any idea why it is considered useful to delete shelliconcache on a routine basis? On many machines it is reluctant to rebuild when deleted.
I wondered if you might happen to know the reasoning behind this feature.

RM, 98SE (4.10.2222) I just d-loaded the file, restarted in MSDOS mode, ran it with the more option, (got 3MB of space back) restarted windows, and my "self-expanding" Favorites menu/folder has been deleted from my Start menu. (Near the bottom, between Programs and Shut Down.) WTF!?

RM, Found the problem. I have registry keys that allow me to hide folders etc. (NOT Tweakui) through menu's. The HIDE Favorites somehow got checked (Enabled) by running your delindex.bat. No offence, but I think for now I'll just go back to my little purge.bat that I wrote;
purge.bat
@echo off
cls
echo.
echo.
echo.
echo This batch file must run from the RAW DOS COMMAND PROMPT ONLY!
echo.
echo NOT from a DOS WINDOW while WINDOWS IS RUNNING!
echo.
echo.
echo It will clear unnecessary files from your Temp, History, Cookies, Recent,
echo Temporary Internet Files, and Applog sub-directories.
echo.
echo.
echo Press Ctrl+C to terminate this process. . . OR,
pauselh c:\windows\SMARTDRV 4096 16 >nul
@echo off
cls
echo.
echo.
echo A Clear All Files and Directories
echo B Clear Temporary Internet Files Only
echo C Clear History Folder Only
echo D Clear Temporary Folder Only
echo E Clear Applog Folder Only
choice /c:abcde Choose an Option
if errorlevel 5 goto applog-only
if errorlevel 4 goto temp-only
if errorlevel 3 goto history-only
if errorlevel 2 goto temp-internet
if errorlevel 1 goto all-files:all-files
c:\windows\command\deltree/y c:\windows\temp
c:\windows\command\deltree/y c:\windows\recent
c:\windows\command\deltree/y c:\windows\tempor~1
c:\windows\command\deltree/y c:\windows\locals~1\tempor~1
c:\windows\command\deltree/y c:\windows\cookies
c:\windows\command\deltree/y c:\windows\history
c:\windows\command\deltree/y c:\windows\applog
if EXIST d:\win386.swp del d:\win386.swp
if EXIST e:\win386.swp del e:\win386.swpif EXIST c:\perform.log del c:\perform.log
if EXIST c:\*.syd del c:\*.syd
if EXIST c:\*.b~k del c:\*.b~k
if EXIST c:\*.--- del c:\*.---
if EXIST c:\windows\*.syd del c:\windows\*.syd
if EXIST c:\windows\*.b~k del c:\windows\*.b~k
if EXIST c:\windows\*.--- del c:\windows\*.---
if EXIST c:\windows\*.pss del c:\windows\*.pss
goto exit:applog-only
c:\windows\command\deltree/y c:\windows\applog
goto exit:temp-only
c:\windows\command\deltree/y c:\windows\temp
goto exit:history-only
c:\windows\command\deltree/y c:\windows\history
goto exit:temp-internet
c:\windows\command\deltree/y c:\windows\tempor~1
c:\windows\command\deltree/y c:\windows\locals~1\tempor~1
c:\windows\command\deltree/y c:\windows\cookies
goto exit:exit
exit

You're the only one that ever reported that kind of problem. I don't know how a registry key is affected by Delindex.bat unless a registry key points to a file that was deleted. But that still wouldn't change the key itself, would it?
But your batch file (really nice!) deletes many of the same files and folders as delindex, so I don't know how delindex can wind up hiding your favorites and purge.bat does not. If you (or anyone else) can help me understand this, I sure would appreciate it.
BTW: By default in WinME "C:\Windows\Command" is part of the path statement. If that's also true with Win98 (is it?), you can use Deltree without preceding it with “c:\windows\command”.
I have some suggestions for purge.bat. Please post back if you’re interested.

NEWPURGE.BAT
==================================================
@echo off
cls
echo.
echo This batch file must run from the RAW DOS COMMAND PROMPT
echo ONLY, and NOT from a DOS WINDOW while WINDOWS IS RUNNING!
echo.
echo It will clear unnecessary files from your Temp, History, Cookies,
echo Recent, Temporary Internet Files, and Applog sub-directories.
echo.
echo If Windows is Running enter Q to Q(uit); otherwise enter C to C(ontinue)
choice /C:cq /n /t:q,99 “Enter Q or C: ”
if errorlevel==2 goto EXIT
lh c:\windows\SMARTDRV 4096 16 >nul
::
cls
echo.
echo MENU:
goto MENU2
:MENU
cls
echo Chose another item from the MENU:
:MENU2
echo.
echo A = Clear All Files and Directories
echo B = Clear Temporary Internet Files Only
echo C = Clear History Folder Only
echo D = Clear Temporary Folder Only
echo E = Clear Applog Folder Only
echo Q = Quit
echo.
choice /c:abcdeq /n /t:q,99 “Choose an Option: ”
:: only the first 8 characters of a label are recognized
if errorlevel 6 goto EXIT
if errorlevel 5 goto APPLOG
if errorlevel 4 goto TEMP
if errorlevel 3 goto HISTORY
if errorlevel 2 goto TIF
::
:ALL
:: the “\” after “c:\window\temp” is required, because
:: windows does not recreate TEMP folders
deltree/y c:\windows\temp\
deltree/y c:\windows\recent
deltree/y c:\windows\tempor~1
deltree/y c:\windows\locals~1\tempor~1
deltree/y c:\windows\cookies
deltree/y c:\windows\history
deltree/y c:\windows\applog
:: Why would you delete the Swap File?
:: if EXIST d:\win386.swp del d:\win386.swp
:: if EXIST e:\win386.swp del e:\win386.swp
if EXIST c:\perform.log del c:\perform.log
if EXIST c:\*.syd del c:\*.syd
if EXIST c:\*.b~k del c:\*.b~k
if EXIST c:\*.--- del c:\*.---
if EXIST c:\windows\*.syd del c:\windows\*.syd
:: what are these next 3 files?
if EXIST c:\windows\*.b~k del c:\windows\*.b~k
if EXIST c:\windows\*.--- del c:\windows\*.---
if EXIST c:\windows\*.pss del c:\windows\*.pss
goto EXIT
::
:APPLOG
deltree/y c:\windows\applog
goto MENU
::
:TEMP
:: the “\” after “c:\window\temp” is required, because
:: windows does not recreate TEMP folders
deltree/y c:\windows\temp\
goto MENU
::
:HISTORY
deltree/y c:\windows\history
goto MENU
::
:TIF
deltree/y c:\windows\tempor~1
deltree/y c:\windows\locals~1\tempor~1
deltree/y c:\windows\cookies
goto MENU
::
:EXIT
:: an exit command here is only required if you’re running in a DOS Window==========
Comments?

Here's a "cheat" to see if it is running from a DOS window.
if not "%windir%"=="" goto {error label}
where {error label} indicates that Windows is still running and to restart to DOS
Note:
Windows DOES rebuild the %temp% folder if it does not existI would add a Path statement that includes \windows\command
This will ensure that the file works even when the Path statement is screwed up(not the default)You're right. You shouldn't be deleting the swapfile. On windows 98, this just forces windows to recreate it. AND, if the disk is freshly defragged, the recreated file will be farther inside the disk (ie: slower). As well, if the user has created a semipermanent file (moved to the front or not), this again will move the swap farther into the drive.
If you are deleting the files in \applog, you are negating their purpose, which is to allow defrag to Optimize the loading of programs. If you decide you want to delete them, ALSO stop TaskMon from running.
You have lumped cookies in with TIF for some reason. I frequently delete the TIF folders and on an INfrequent basis, delete the \Cookies folder.
The "pointer" cookies in \TIF are populated based on the index.dat file in \cookies. And, the index.dat file, if deleted, is recreated based on the contents of the \Cookies directory.Deleting the \TIF folder should not affect anything, but deleting \Cookies has the obvious effect of forcing the reentry of web site data.

RM,
It must have been a fluke/glitch. I just did the exact moves as the first time, and ran it again today. No problems. The reg keys I mentioned have only been in place for about 6 : 8 days. Hardly proven themselves yet in that short amount of time. (I highly trust the source, but I too "tinker", so mileage can vary.)I've looked through your file and I could not see anything that would suggest or trigger such a thing. Sorry for the false alarm. I probably shouldn't have posted so quickly, but I thought: "If there ~is~ something (amiss), he should know about it ASAP."
C:\Windows\Command is indeed part of the 98/98SE path statement,
".... you can use Deltree without preceding it with “c:\windows\command”."I was brought up to ALWAYS show the complete path to any program from within a program. (Using bat to fire an exe.) It's automatic, I just type it in. (Really showing my age here.)
Just quickly glanced through yours & Whitphil's replies. Gotta run now but I've copied them in to a text file that I can read later. Thanx

Thanks for the info. A note on including the full path: I agree, mostly. I like the batch file to show anyone who's interested where to look for a file or folder even if it is in the path. However, I draw the line at DOS commands, like del, xcopy, deltree, move, choice... you get the idea.
A reason to delete the cookies folder is to get rid of index.dat which keeps growing and is never resized. Since deleting the index.dat file itself renders the cookies useless, you might as well delete the cookies.
I like the idea of 'if not "%windir%"=="" goto {error label}'. I have WinMe and had that line in Delindex and it worked fine. Then I tried it on my brother's Win98 computer and the program wouldn't work at all. If I remember correctly, if you type in set at a DOS prompt (after having rebooted into DOS) you still get values for winbootdir and windir. Since I wanted the program to work in Win98 as well as WinME, I took that line out. Please help me out if I'm missing something here.
Since Dan's PURGE.BAT already used a choice command, I couldn't see what he'd resort to "Press Ctrl+C to terminate this process" but that's just a minor quibble.
In WinME, it seems that TEMP folders are not recreated. It's possible that they are, but only when needed, as opposed to being recreated when the computer is (re)started. Again, I wanted Delindex to function with both OSs.
Isn't DOS fun?

WinMe must also treat cookies diffently.
On 98, I can delete the \TIF folder, delete \Cookies\Index.dat and on a reboot, the \cookies\index.dat file is rebuilt and seems to be based on the content of \cookies, since all of the cookies work, and the \TIF folders are rebuilt with the pointer cookies, which are based on the content of \cookies\index.dat.
No idea why the IF statement didn't work on the 98 box. Even it the variable doesn't exist, the bat file should still work since the value of the variable will still be null.

That's my point: if the variable is NOT blank it goes to {error message}. In WinME, there are NO windir/winbootdir listing when the StartUp disk is used. In Win98, I'm pretty sure there are windir and/or winbootdir settings even when you restart in DOS mode.
If anyone is willing, please reboot to DOS in Win98, type set, and tell me if there are any listings for windir and/or winbootdir. Thanks!

Win98FE
Restart to DOS
SET shows no Windir but does have WinBootDir definedThe following bat file
if not "%windir%"=="" goto err
echo Null
goto done
:err
echo Something
:doneEchos "Null" and the IF statement shows the interpretation (if Echo is ON) of
If not ""=="" goto err
which is what it should with a variable that doesn't exist (it's value is null)
In a DOS window the bat file echos "Something"
and the if statement shows the interpretation ofIf not "C:\Windows"=="" goto err
which is correct.
Windir=C:\WindowsWhen you say "the program wouldn't work at all", does the bat file indicate that it thinks Windows is running, or does it fail?

First off, let me say the only reason I pasted in my purge.bat was to show RM what I was running, very similar to his (though not as thorough/complex). The premise of the file was me & mine. It was never meant to be used by anyone other than myself, on my machine. It's "birth" came about as a result of me finding out about the MS structure of hiding things. That sort of bothered me.
"Since Dan's PURGE.BAT already used a choice command, I couldn't see what he'd resort to "Press Ctrl+C to terminate this process" but that's just a minor quibble."
It has only recently been expanded to include the choices. The original
was bare bones, no choices or warnings. Run it, BANG, it's done. I added the warning header and the pause, well, just cause you're suppozta. Another "member" of this forum must have seen it in some posting, and asked me how hard it would be to incorporate the choice of only certain folders/files. So I added the choice parameter and associated commands. (I still use my first one, the one that goes BANG!)Re; APPLOG, I don't use taskmon, and I don't re-order the files during defrag. (I use ME defrag.)
Re; swapfile, Everyone has their own idea and perspective of this subject. I do what I do with mine because it works for me, on my machine, with the software I run. I delete my swap file just to clean up between bootings. It's never used (98% of the time).
Settings; Drive D: (Sec. Mas.), Min: 0, Max: No Maximum
System.ini; [386Enh], ConservativeSwapfileUsage=1Thus, I don't care where on the drive platters it resides. I don't need fast access to something I don't use. I know enough to reset my swapfile parameters and reboot if I'm going to need it. If it turns out that this decision is permanent, I'll run Speedisk and put it to the front of the drive.
Re; COOKIES in with TIF, I put it in mine simply because it's part of the internet realm. (I don't visit many sites which require me to use a password, so re-entering one or two after a purge is no big deal.) If that changed, I'd save the cookies I wanted as RM does.
":: only the first 8 characters of a label are recognized"
I know, but it's more descriptive to continue the label. As long as those first eight are recognized without conflict to another label.

One Win98 user had his Windows Media Player files deleted by DELINDEX.BAT. (His c:\progra~1\window~2 was his Windows Media Player folder and not WindowsUpdate.) DELINDEX was corrected: the new version is dated 3/22/02. Thanks to sekirt for the heads-up.
THESE WERE THE PROBLEMATICAL LINES (FOR Win98):
if exist c:\progra~1\window~2\wuhistv3.log move /y c:\progra~1\window~2\wuhistv3.log c:\>nul
deltree /y c:\progra~1\window~2\>nul
if exist c:\wuhistv3.log move /y c:\wuhistv3.log c:\progra~1\window~2\>nulTHEY WERE CHANGED TO:
if not exist c:\progra~1\window~2\wuhistv3.log goto NOHISLOG
move /y c:\progra~1\window~2\wuhistv3.log c:\>nul
if errorlevel 0 if not errorlevel 1 deltree /y c:\progra~1\window~2\>nul
move /y c:\wuhistv3.log c:\progra~1\window~2\>nul
:NOHISLOGDownload the corrected (3/22) version here.
=================================================
FYI: Long file names do not work in DOS, even if enclosed in "".

Sorry about the missing hyperlink. Copying a post with a hyperlink obviously does not include that hyperlink when it’s pasted.
Click here for the corrected version.

Info aboutthe NEW 6/21/02 Delindex.bat is here (ME Forum) and here (9x Forum).
Info about the NEW 6/21/02 Delta.bat is here (ME Forum) and here (9x Forum).

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

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