Problem deleting "Temporary Internet File" directory but not Netscape Cache or WIndows Temp direcctory contents???

I set up a small batch file for my brother so he can click on it when he is not in a browser in order to clean up temp, cache, etc files. He has Windows 98.


The batch file I wrote, which is redundant to be safe is at the end of this question.

The batch file looks and runs fine to me.
And when I drop to DOS and go to
C:\Windows\tempor~1  (temporary internet files)

and do a DIR, I see nothing there at all...... Empty...
I appear happy but.....


If I now open up Explore (Start Explore) and open up that same exact subdirectory, it is chock full of stuff....
I do not get it....

When in DOS with the DIR command it says zero files and 2 subdirectories which are the . and ..   Normal to me.  Appears empty in my small mind.

I then did a refresh in Explore and looked at subdirectory.
Still full of stuff. Huh???
I said this cannot be so. But I was still able to highlight files in that directory (jpg, htm, etc...) and delete them.......

So long story short...DOS said no files are in there.
Explorer says sure there are doofus....


I even tried the Attrib command in DOS to see if they are hidden files. Nope, no files in there.

Why the discrepancy???

How can I get the Batch program to work properly AND have DOS DIR match what Explorer is showing??? I want these files gone as part of an automated process in the BAT file if posssible.

I cannot do a DOS DELTREE on the tempor~1  directory since I then need to recreate it, and I do not think I can do a long directory file name creation in DOS with the MD command. Also my brother does not want to reboot the system if I were to delete the entire subdirectory.

So why is DOS reporting that ONLY (see note below) this directory "Temporary Internet Files" is empty while Explorer does not???

When we run this bat file we do not have Netscape or IE open.

Note: This ONLY happens with the Temporary Internet File   subdirectory.
The Netscape USERS CACHE and the Windows\Temp directories clear out fine with the Batch file and Explorer reports them as empty just as DOS does. They match as expected.

So I tried the same logic on the Tempor~1 with no success....

I can even go into DOS and do a DIR on tempor~1 and it will say 0 files. Then for grins I type in Erase *.* and then fire up Explorer. And there are tons of files there... Still Inconsistent..

Thanks so much...
Sincerely,
Peter
pcumming@carolina.rr.com

Poor Batch File I wrote and run.....

C:
CD\
DEL *.CHK
C:
CD\Windows\Temp
Erase *.* < C:\Yes
DIR
CD\Windows
Deltree/Y TEMP
CD\Window
MD Temp
CD\Windows\Temp
DIR
CD\Windows\tempor~1
Erase *.*  < C:\Yes
DIR
CD\Windows\tempor~1\Content.ie5
Erase *.* < C:\Yes
DIR
CD\Windows\tempor~1
DELTREE/Y Content.ie5
MD Content.ie5
CD\Windows\tempor~1\Content.ie5
CD\Progra~1\Netscape\users\jack_c~1\Cache
Erase *.* < C:\Yes
CD\Progra~1\Netscape\users\jack_c~1\
DELTREE/Y CACHE
MD CACHE
CD\progra~1\Netscape\users\jack_c~1\cache

pacummingAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
dew_associatesConnect With a Mentor Commented:
Hi Peter,

Writing that for your brother was very thoughtful! Unfortunately though IE 4, 4.01, 5 and 5.01 all use protected cache files for temporary internet files and employs anti-aliasing.

Go into System Tools and open Disk Cleanup. Now check all four boxes to set that as a default.

Now set the maintenance wizard to run in the task scheduler. This will clean everything out except the temp files needed to repair version 5 and 5.01 of IE.

Dennis


0
 
pacummingAuthor Commented:
Edited text of question.
0
 
pacummingAuthor Commented:
Edited text of question.
0
Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

 
BeavisandButtheadCommented:
Probably because it's a system directory.

Try running from DOS mode or

in your batch file try clearing system attribute with following

attrib C:\windows\tempor~1\ -s


and change back at end of batch file with +s instead of -s
0
 
pacummingAuthor Commented:
I ran an attrib *.* -s as mentioned above and it showed no files. It did not work but a good thought with the -s command. The files still showed up in Explorer. So I ran the System Disk Cleanup command in Win98.
Too bad Batch file cannot handle it correctly. You would think at least it would show the files in there though.

Now need to put my batch file on Win 95 PC's and I hope that it does not lock the tempor~1 subdirectory like WIN98 does

Strange stuff...

Peter
0
 
BeavisandButtheadCommented:
This is one of the things I hate about Win98. It's been dumbed down to help the "average user."
0
 
pacummingAuthor Commented:
Yes I had to resort to the above unfortunately. It even occurs on my Win 95 system but it will let you delete the subdirectories via DOS under the Temporary Internet Files folder.

THe one question though I have is, is I do not see a similar CLeanup program for Windows 95. Wonder if 98 will work. If you email it to me, I will give it a shot...
Best test to see if it will run off of floppy in cas it is looking for other files.


Thanks, Peter
0
 
dew_associatesCommented:
Unfortunately Peter is was designed by Intel just for Windows 98 and won't work on Win95.

Whenever you are working with temporary files of any kind involving the cache, and especially that of IE 5 or 5.01, never remove the actual folders.
0
 
pacummingAuthor Commented:
There is a 3rd party program I read about. I will look for it. It deletes everything but the cookies.....

Too bad Windows too the Macros away.

Thanks again,
Peter
0
All Courses

From novice to tech pro — start learning today.