need to clear cookies in IE using perl Win 32 IE automation

V

vish.chitnis

hi there,

i am beginer in perl and i need to clear IE cookies and temporary
internet files before i call goto URl to access my application url. how
can i clear cookies and temp internet files?

thanks
vishwanath
 
M

Matt Garrish

hi there,

i am beginer in perl and i need to clear IE cookies and temporary
internet files before i call goto URl to access my application url. how
can i clear cookies and temp internet files?

I have no idea what calling goto URI is, but the fastest way I can
think of to clear the cache would be to just delete everything in

C:\Documents and Settings\<<current user>>\Local Settings\Temporary
Internet Files

where the current user obviously is you. First choices would just be to
shell out and do a del from your script or use File::Find to traverse
the directory and delete files as you go.

If the location is variable, you can always get the cache directories
from the registry in
HKLM\Software\MIcrosoft\Windows\CurrentVersion\Internet Settings\Cache
(on XP anyway).

Matt
 
V

vish.chitnis

thanks matt...i tried doing this..and the way i tried is using the
system commands in DOS to clease browser cookies..

system ('del /q /s /f "C:\Documents and Settings\user\Local
Settings\Temporary Internet Files\*.*"');
but i saw only few of the cache is getting deleted and not all the
files..any idea how do i clear the entire cache folder..
thanks
vish
 
M

Matt Garrish

[TOFU corrected]
thanks matt...i tried doing this..and the way i tried is using the
system commands in DOS to clease browser cookies..

system ('del /q /s /f "C:\Documents and Settings\user\Local
Settings\Temporary Internet Files\*.*"');
but i saw only few of the cache is getting deleted and not all the
files..any idea how do i clear the entire cache folder..

Try using the /a modifier to get rid of the hidden files, etc. You
shouldn't have IE open when you do this, though, because it may keep
some files locked, but it should do the job as a quick and dirty hack.

Matt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top