Computing.Net > Forums > Windows 95/98 > Deleting cookies with Batch files?

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Deleting cookies with Batch files?

Reply to Message Icon

Name: Jacky
Date: April 16, 2000 at 07:08:17 Pacific
Comment:

Thanks to all who answered my previous post! I have been trying to delete my c:\windows\temporary internet files by adding the folowing line in either a batch file or in the autoexec.bat (I've been "experimenting" with both ways.)

del c:\windows\tempor~1\*.???

I know you can use *.* but that gives you the annoying "are you sure" question, and the *.??? does not. The problem is that I always get a "file not found" error. And it never deletes the contents of the folder. Deleting the cookies and temp folders this way works fine (except for the access denied error with the cookies folder, because of the index.dat file, if done through a batch file.) However with the temporary internet files folder it just won't work. Can anyone tell me why?



Sponsored Link
Ads by Google

Response Number 1
Name: Wunderdude1
Date: April 16, 2000 at 07:54:20 Pacific
Reply:


: In autoexec.bat add a line similar (not exact) to:

: if exist c:\windows\cookies\*.* deltree /y c:\windows\cookies\*.*

: Use notepad to open autoexec.bat and type in YOUR delete line.

: The next entry will delete EVERYTHING in the temp folder. The * = any, therefore delete any(name).any(extension). You could be specific, i.e., "cookie.dat" (or however the cookie is identified)

: if exist c:\windows\temp\*.* deltree /y c:\windows\temp\*.*


0

Response Number 2
Name: Sylvain
Date: April 16, 2000 at 08:00:50 Pacific
Reply:

Temporary folder is a system folder.. You have to remove the S attribute...
You batch file should go:
attrib -s tempor~1
echo y| deltree c:\windows\tempor~1


0

Response Number 3
Name: Wunderdude1
Date: April 16, 2000 at 08:02:16 Pacific
Reply:

PS Don't forget to change the attribute on the Cookies Folder itself, as it is probably checked as a System folder, change it to Archive.


0

Response Number 4
Name: BootLoG
Date: April 16, 2000 at 13:09:37 Pacific
Reply:

Put this in the autoexec.bat file

Deltree /Y C:\Windows\Cookies
MD C:\Windows\Cookies


0

Response Number 5
Name: Ronnie Ratt
Date: April 17, 2000 at 00:45:56 Pacific
Reply:

Jacky the *.??? is not a valid command, the *.* is called a 'wildcard' meaning all files and if you only want certain files removed you can use, for example, *.txt

I had the command in my Autoexec.bat and it just did it without conferring with me and just kept booting.

There may also be a program blocking it from being deleted as well like Realplayer G2 [and the new version] or as I found out recently Norton Cleansweep which monitors the cache folders, You could try deleting from Command Prompt Safe Mode [F8], this has worked for me with stubborn files in the past.


0

Related Posts

See More



Response Number 6
Name: Jacky
Date: April 17, 2000 at 07:23:56 Pacific
Reply:

Thank you all!

Ronnie Ratt: *.??? not valid? It works perfectly fine with the cookies and temp folders. I get no errors (as long as they are not already empty, which gives a file not found error), no big deal. I know that *.* is typically the way you do it, but I was getting the "are you sure?" at every bootup and needed to always answer yes. Not something I wanted to have to do at every startup. I knew "?" is also a wildcard so I thought I'd try it for the extention and it worked fine and does not ask me to confirm anything. It just goes ahead and deletes everything. I just have to get it to work for the temporary internet folder! Thanks again for responding.


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

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


Go to Windows 95/98 Forum Home


Sponsored links

Ads by Google


Results for: Deleting cookies with Batch files?

Delete cookies,temp int files and history but still links change colour when i return to a site? www.computing.net/answers/windows-95/delete-cookiestemp-int-files-and-history-but-still-links-change-colour-when-i-return-to-a-site/47487.html

batch file copy/rename foldername+# www.computing.net/answers/windows-95/batch-file-copyrename-foldername/165834.html

Deleting registry keys with .reg files www.computing.net/answers/windows-95/deleting-registry-keys-with-reg-files/18739.html