JBeardNC Posted December 10, 2010 Share Posted December 10, 2010 I did a search for deleting cookies and I found ways to delete ALL cookies but wondering if anyone knows of a way to delete specific cookies. I need to delete, for example, any cookies like "*.google.com" I tried using the FileListToArray function on my Cookies folder (Temporary Internet Files folder on Windows 7) and it doesnt seem to work like it does on any other folder. Any thoughts? Link to comment Share on other sites More sharing options...
wakillon Posted December 10, 2010 Share Posted December 10, 2010 Like this ? _DeleteCookies ( "@google" ) Func _DeleteCookies ( $_String ) ; google cookies ; C:\Documents and Settings\Administrateur\Cookies\administrateur@google.co[1].txt ; C:\Documents and Settings\Administrateur\Cookies\administrateur@google[2].txt ; C:\Documents and Settings\Administrateur\Cookies\administrateur@google[3].txt $_CookiesDir = @UserProfileDir & '\Cookies' ;ConsoleWrite ( "$_CookiesDir : " & $_CookiesDir & @Crlf ) $_TxtFileArray = _FileListToArray ( $_CookiesDir, '*.txt' ) ; _ArrayDisplay ( $_TxtFileArray ) For $_T = 1 To UBound ( $_TxtFileArray ) -1 If StringInStr ( $_TxtFileArray[$_T], $_String ) <> 0 Then FileDelete ( $_CookiesDir & '\' & $_TxtFileArray[$_T] ) Next EndFunc ;==> _DeleteCookies ( ) AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
JBeardNC Posted December 10, 2010 Author Share Posted December 10, 2010 Awesome!! That works great on an XP machine. Can't get it to work on Windows 7 though. The @UserProfileDir & '\Cookies' folder apparently does not exist or something because if I try and browse to that, I get access denied (strange). Any thoughts on how to get it to work on W7? Link to comment Share on other sites More sharing options...
wakillon Posted December 10, 2010 Share Posted December 10, 2010 Awesome!! That works great on an XP machine. Can't get it to work on Windows 7 though. The @UserProfileDir & '\Cookies' folder apparently does not exist or something because if I try and browse to that, I get access denied (strange). Any thoughts on how to get it to work on W7?I can't help you for 7, I'm on xp ! AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
JBeardNC Posted December 10, 2010 Author Share Posted December 10, 2010 Nevermind... simple Google search reveals the location of cookies on Windows 7 PC's. I modified the variable and I'm good to go. Thanks!!! Link to comment Share on other sites More sharing options...
wakillon Posted December 10, 2010 Share Posted December 10, 2010 Nevermind... simple Google search reveals the location of cookies on Windows 7 PC's. I modified the variable and I'm good to go. Thanks!!!Please post your script adapted for all OS...this may help others ! AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now