Delete cookie

Hi,

Does anyone know of an effective way to delete cookies?

I have been using this:

class Cookie def kill (dir= \ "C:\\Documents and Settings\\"+ENV['USERNAME']+"\ \Local Settings\\Temporary Internet Files") require 'fileutils' FileUtils.rm_rf dir end

But doesn’t seem to always work

Aidy

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

aidy wrote:
| Hi,
|
| Does anyone know of an effective way to delete cookies?
|
| I have been using this:
|
|
| class Cookie
| def kill (dir=
| “C:\Documents and Settings\”+ENV[‘USERNAME’]+"
| \Local Settings\Temporary Internet Files")
| require ‘fileutils’
| FileUtils.rm_rf dir
| end
|

|
| But doesn’t seem to always work

What are the error messages you get, if any?

Remember, if a file is in use, you cannot delete it (OS level lock), and
it may be possible that Internet Explorer is still running.

Another way to accomplish what you could be the win32ole library, to use
IE to delete the cookies.


Phillip G.
Twitter: twitter.com/cynicalryan
Blog: http://justarubyist.blogspot.com

~ Why waste time learning, when ignorance is instantaneous?
– Calvin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhIHE0ACgkQbtAgaoJTgL+I5wCfXx6ZXyAgOOJjctajfMRFqdlq
5AkAn37TYiCEEHp4C0U2QaGhqInpxBTV
=FnhJ
-----END PGP SIGNATURE-----

aidy wrote:

Hi,

Does anyone know of an effective way to delete cookies?

I have been using this:

class Cookie def kill (dir= \ "C:\\Documents and Settings\\"+ENV['USERNAME']+"\ \Local Settings\\Temporary Internet Files") require 'fileutils' FileUtils.rm_rf dir end

But doesn’t seem to always work

Aidy

Hi,

Its very delayed reply for this thread. But i hope it will help for
person who are still facing the same issue.
Hi All,

URL -->
http://raveendran.wordpress.com/2009/09/07/ruby-accessing-ccleaner/

This article will help to delete cookies,temp files in windows machine.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs