Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I posted this in DOS but just got told it's illegal and big bubba is taking me to jail.
Hi there I was hoping someone could help me make a simple batch file to delete internet cookies and history in Windows XP.
I tried doing this
@echo off
rmdir \s C:\Windows\Documents and settings\Local Settings\Temporary internet files\*.*
but all I got was an error message saying it couldn't find the path or file.I was thinking maybe I should truncate the long directory names to 8 characters but I don't know how to make the space in Local settings into a character and when I try doing local ~1 I get error messages.
Thanks for any advice :-)

del /Q c:\docume~1\YOURUSERNAME\Cookies\*.*
then it will work , it will tell u that it cant delete index.dat (thats normal) but everything else will be deleted .. u can do the same for other directory like tempor~1
hope this help u .. i dont see anything that can lead u to jail with this lol !

Hi there Snipes! Thanks very much for replying. The first line to delete the cookies works great but I don't know how to type the path to the Local Settings folder. I tried local~~1 and local ~1 but I just keep getting the error 'Cannot find the path specified'
Do you know how to type that in?
Thanks again for your help :-)
PS I meant I was going to jail for posting it in the DOS forum hehe :-)

Goosh,
locals~1 do you see a pattern emerging? first 6 charectors, anything longer will need a ~1 (is the general rule however there are exceptions)
JS

JS is right remember the pattern
heres what u want pal
Del /Q c:\docume~1\USERNAME\Locals~1\Tempor~1\*.*

Hey guys! Thanks for the advice. I see now that I just ignore the space between local and settings. I'm still getting an error though. This is what it says:
C:\Documents and Settings\Desktop>del /Q c:\docume~1\Cookies\*.*
c:\docume~1\libpc2\Cookies\index.dat
The process cannot access the file because it is being used by another process.C:\Documents and Settings\Desktop>del /Q c:\docume~1\locals~1\temp
or~1\*.*
Could Not Find c:\docume~1\locals~1\tempor~1\*.*C:\Documents and Settings\Desktop>del /Q c:\docume~1\locals~1\temp
\*.*C:\Documents and Settings\Desktop>del /Q c:\docume~1\libpc2\locals~1\hist
ory\*.*
Could Not Find c:\docume~1\locals~1\history\*.*Thanks for any more advice :-)

ok try this
cd "C:\Documents and Settings\USERNAME\Local Settings\Temporary Internet Files"
del /f /s /a r h s a *.* (it works without any errors)its normal to get that error for index.dat in ur cookies as u cant delete it it is used by windows

like this is better if u dont want dos to ask if ur sure u want to delete the file :
cd "C:\Documents and Settings\USERNAME\Local Settings\Temporary Internet Files"
del /q /f /s /a r h s a *.*

Hey snipes! You're amazing! Sorry it's taken me so long to get back to you. I've been a bit busy. Thanks very much for the last post because that seems to work perfectly :-)

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

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