hi all
is there a way to clear cookies???
i've currently worked this out but i don't know why it doesn't work...
System.IO.File.Delete("C:\Documentes and Settings\" & Environment.UserName.ToString & "Cookies\")
Printable View
hi all
is there a way to clear cookies???
i've currently worked this out but i don't know why it doesn't work...
System.IO.File.Delete("C:\Documentes and Settings\" & Environment.UserName.ToString & "Cookies\")
to access the Cookies Folder use this code:Quote:
Originally Posted by JXDOS
VB Code:
Environment.SpecialFolder.Cookies()
Regards,
You aren't specifying a file to delete. You've specified a folder. If you want to delete all cookies then you'd need to get a list of all the cookie files and then delete each one.VB Code:
For Each cookieFile As String In IO.Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.Cookies), "*.txt") Try IO.File.Delete(cookieFile) Catch End Try Next cookieFile
it worx! it worx! thank a lot!
Don't forget to resolve your thread from the Thread Tools menu.