Computing.Net > Forums > Windows XP > delete batch file for XP please?

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.

delete batch file for XP please?

Reply to Message Icon

Name: goosh
Date: February 2, 2005 at 05:39:23 Pacific
OS: XP pro
CPU/Ram: 700/512
Comment:

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 :-)



Sponsored Link
Ads by Google

Response Number 1
Name: snipes
Date: February 2, 2005 at 05:54:56 Pacific
Reply:

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 !


0

Response Number 2
Name: goosh
Date: February 2, 2005 at 06:06:18 Pacific
Reply:

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 :-)


0

Response Number 3
Name: Jacques Schmitt
Date: February 2, 2005 at 06:23:17 Pacific
Reply:

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


0

Response Number 4
Name: snipes
Date: February 2, 2005 at 06:48:05 Pacific
Reply:

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


0

Response Number 5
Name: goosh
Date: February 2, 2005 at 06:56:39 Pacific
Reply:

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 :-)


0

Related Posts

See More



Response Number 6
Name: snipes
Date: February 2, 2005 at 08:15:54 Pacific
Reply:

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


0

Response Number 7
Name: snipes
Date: February 2, 2005 at 08:17:38 Pacific
Reply:

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 *.*


0

Response Number 8
Name: goosh
Date: February 7, 2005 at 06:28:24 Pacific
Reply:

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 :-)


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 XP Forum Home


Sponsored links

Ads by Google


Results for: delete batch file for XP please?

Batch file HELP! www.computing.net/answers/windows-xp/batch-file-help/149551.html

Creating Batch files for XP www.computing.net/answers/windows-xp/creating-batch-files-for-xp/144010.html

batch file for time delay in xp www.computing.net/answers/windows-xp/batch-file-for-time-delay-in-xp/78216.html