Computing.Net > Forums > Windows XP > Temp. Internet Files deletion

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.

Temp. Internet Files deletion

Reply to Message Icon

Name: Leif
Date: May 13, 2003 at 10:31:28 Pacific
OS: Win XP Pro
CPU/Ram: n/a
Comment:

I have been given the task of automating the deletion of files in a Win XP users Temporary Internet Files directory, as well as their cookies directory. Both of these directories can be found in Documents and Settings\username\Local Setttings.

I thought this would be a very simple task, I found the variables for current user and system drive, and write a batch file to delete all of the files in both directories. When I tried testing it nothing was getting deleted from Temporary Internet Files, and in fact from the NT command prompt you can't even see this directory unless you explicitly cd into it. It's a read only directory, and I tried to change that both through the GUI and with attrib from CL. Windows wouldn't let me do it. Next I tried deleting the files with a VBScript, and that failed to work with this directory as well. The only thing I can do that sort of works is invoke the Disk Cleanup wizard from the CL, but it won't remove the cookies in this directory, just the temp files.

Does anyone know how to get Windows to let you automate file deletion in this directory?? I am all out of ideas.



Sponsored Link
Ads by Google

Response Number 1
Name: PhilC
Date: May 13, 2003 at 11:47:58 Pacific
Reply:

In Internet browser go to tools, Internet options, Advanced tab, scroll down to Security and tick Empty Temporary Internet Files folder when browser is closed. I don't no if this clears cookies as well. May be not

PhilC


0

Response Number 2
Name: jam
Date: May 13, 2003 at 12:19:05 Pacific
Reply:

Tools/Internet Options/General


0

Response Number 3
Name: Lesley
Date: May 13, 2003 at 12:44:37 Pacific
Reply:


As PhilC says - for the TIF's - but this doesn't empty the Cookies


0

Response Number 4
Name: Pucho
Date: May 13, 2003 at 13:18:51 Pacific
Reply:

Do this. Right click on your desktop and make a new "text" document.
THen copy and paste this command without the asterisks. "@echo on
cd %homedrive%%homepath%
rd /s/q locals~1\tempor~1
rd /s/q locals~1\temp\tempor~1
rd /s/q cookies
rd /s/q temp\cookies
rd /s/q locals~1\history
rd /s/q locals~1\temp\history
rd /s/q recent
md recent
rd /s/q locals~1\temp
md locals~1\temp "
call the file clean.cmd and save it in the directory C:\Documents and Settings\user\Start Menu\Programs\Startup. The user is yourself. Reboot


0

Response Number 5
Name: Leif
Date: May 13, 2003 at 13:46:14 Pacific
Reply:

I am supposed to avoid the Tools Option, because... What I don't understand is why Windows has such a grip on this directory, I mean it's a temp dir, who cares.

Pucho I tried that, and it didn't work for me, however I will play with it a bit more and see if I can get it to work.

This is what has come the closest to working for me(in a bat file):

cleanmgr /sagerun:11
cd %HOMEDRIVE%\Documents and Settings\%USERNAME%\cookies
del * /q
exit


0

Related Posts

See More



Response Number 6
Name: JAmes D. Buskirk
Date: May 14, 2003 at 11:35:12 Pacific
Reply:

I hate to recommend software to solve problems, but it seems perfect for your needs. Check out "Pop up Stopper Professional" at www.panicware.com. It lets you clean up a variety of internet 'trails' such as history, cookies, temp files, and url history. Check it out.


0

Response Number 7
Name: leif
Date: May 16, 2003 at 10:13:18 Pacific
Reply:

Thanks for the info James, but I can't use that. I work for the state, and they are highly unlikely to buy anything for this.

This is why I am not a huge windows fan, things like this shouldn't be difficult to do...


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: Temp. Internet Files deletion

Deleting Temp. Internet Files & Sca www.computing.net/answers/windows-xp/deleting-temp-internet-files-amp-sca/95569.html

Deleting Temp. Internet Files www.computing.net/answers/windows-xp/deleting-temp-internet-files/127003.html

prob deleting temp internet files www.computing.net/answers/windows-xp/prob-deleting-temp-internet-files/104961.html