Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 13th, 2004, 06:13 AM
Registered User
 
Join Date: Aug 2004
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default How Can I Delete Cookie files.

How Can I Delete Cookie files.
????? :)

Reply With Quote
  #2 (permalink)  
Old June 20th, 2007, 11:15 AM
Registered User
 
Join Date: Jun 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

I know its been a long time since you started this thread but I'm looking to find a solution for the similar problem. I want to delete all cookies through my VB application.

If you managed to do it, please let me know how.


Thanks


Reply With Quote
  #3 (permalink)  
Old June 21st, 2007, 03:13 AM
Friend of Wrox
Points: 3,060, Level: 23
Points: 3,060, Level: 23 Points: 3,060, Level: 23 Points: 3,060, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2005
Location: , , .
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

Here is a simple way

Sub Delete_Cookies()

Dim sRoot As String
Dim sCookiePath As String

On Error Resume Next

sRoot = Environ("USERPROFILE")

If Len(sRoot) = 0 Then Exit Sub

If Right$(sRoot, 1) <> "\" Then sRoot = sRoot & "\"

sCookiePath = sRoot & "Cookies\"

Kill (sCookiePath & "*.*")

End Sub

Cheers
Shasur

http://www.vbadud.blogspot.com
Reply With Quote
  #4 (permalink)  
Old June 21st, 2007, 06:37 AM
Registered User
 
Join Date: Jun 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Shasur,

Thanks for your reply. This partly solves my problem. Would you know how to delete the cookies received from a server during an active connection, rather then deleting all of the cookies.

For example if i'm browsing "abc.com" through a webbrowser component in visual basic. I want the application to delete all cookies received from the "abc.com" server straight after I close the session or navigate the browser to a different URL.

I know it sounds complex but I'm sure there's a way to catch the cookies dropped during a current session. I just cant find it :(


Thanks

Zeeshan



Reply With Quote
  #5 (permalink)  
Old August 18th, 2007, 04:56 AM
Registered User
 
Join Date: Aug 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

u just transform this line

Kill (sCookiePath & "*.*")

to this:

Kill (sCookiePath & user & "@abc.com[1].txt"

where "user" find a module that finds the name of the computer u r on.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
delete cache files quickly Maxxim BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 3 September 4th, 2007 09:07 AM
Can't delete cookie...! Snib Beginning PHP 9 July 15th, 2007 10:32 PM
delete files in the server miguel.ossa Classic ASP Basics 1 September 5th, 2005 12:15 PM
Delete Files qazi_nomi Classic ASP Basics 7 October 18th, 2004 06:55 PM
How Can I Delete Cookie files. MICZ Pro VB 6 2 August 13th, 2004 10:44 AM



All times are GMT -4. The time now is 11:43 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.