Discussion:
Using DeleteUrlCacheEntry to delete a single file
(too old to reply)
Jerry West
2007-04-24 21:29:10 UTC
Permalink
I have a single file in the IE cache I want deleted. I am using
DeleteUrlCacheEntry to do so:

l& = DeleteUrlCacheEntry("C:\Documents and Settings\user\Local
Settings\Temporary Internet Files\file.cab")

I always get back an error of 2 indicating that the file cannot be found. If
I open Windows Explorer and view the path I see that the file is indeed
there. Is there another method to using this API other than the example I
show here? Is what I am doing not possible?

Thanks,

JW
Scherbina Vladimir
2007-04-25 10:14:28 UTC
Permalink
Have you tried DeleteUrlCacheEntry("C:\\Documents and Settings\\user\\Local
Settings\\Temporary Internet Files\\file.cab") ?
--
--Vladimir, Windows SDK MVP
Post by Jerry West
I have a single file in the IE cache I want deleted. I am using
l& = DeleteUrlCacheEntry("C:\Documents and Settings\user\Local
Settings\Temporary Internet Files\file.cab")
I always get back an error of 2 indicating that the file cannot be found.
If I open Windows Explorer and view the path I see that the file is indeed
there. Is there another method to using this API other than the example I
show here? Is what I am doing not possible?
Thanks,
JW
Tony Proctor
2007-04-25 13:25:50 UTC
Permalink
You don't need to pair up any "\" characters in VB Jerry. Try playing with
this example to see if it behaves the same way:
http://groups.google.ie/group/microsoft.public.vb.general.discussion/msg/bda75aa7b34e6248?hl=en&

Tony Proctor
Post by Jerry West
I have a single file in the IE cache I want deleted. I am using
l& = DeleteUrlCacheEntry("C:\Documents and Settings\user\Local
Settings\Temporary Internet Files\file.cab")
I always get back an error of 2 indicating that the file cannot be found. If
I open Windows Explorer and view the path I see that the file is indeed
there. Is there another method to using this API other than the example I
show here? Is what I am doing not possible?
Thanks,
JW
J French
2007-04-25 13:45:42 UTC
Permalink
On Wed, 25 Apr 2007 14:25:50 +0100, "Tony Proctor"
Post by Tony Proctor
You don't need to pair up any "\" characters in VB Jerry. Try playing with
http://groups.google.ie/group/microsoft.public.vb.general.discussion/msg/bda75aa7b34e6248?hl=en&
Yes the '\\' stuff is just C conventions
- like talking Mandarin in Shanghai

Try manually deleting the file - I'll bet you get 'access denied'
Jerry West
2007-04-25 17:18:14 UTC
Permalink
The example appears to enumerate through all the cache files. I was hoping
to simply enter the specific path of a cache entry and delete it without the
need to loop through the entire cache. Anyone know if this is possible?

Thanks,

JW
Post by Tony Proctor
You don't need to pair up any "\" characters in VB Jerry. Try playing with
http://groups.google.ie/group/microsoft.public.vb.general.discussion/msg/bda75aa7b34e6248?hl=en&
Tony Proctor
Post by Jerry West
I have a single file in the IE cache I want deleted. I am using
l& = DeleteUrlCacheEntry("C:\Documents and Settings\user\Local
Settings\Temporary Internet Files\file.cab")
I always get back an error of 2 indicating that the file cannot be found.
If
Post by Jerry West
I open Windows Explorer and view the path I see that the file is indeed
there. Is there another method to using this API other than the example I
show here? Is what I am doing not possible?
Thanks,
JW
Tony Proctor
2007-04-25 18:16:35 UTC
Permalink
The suggestion was not to use that sample as a replacement for your code,
but to see if the results are any different when you attempt to delete the
same file entry. If it works in this sample code then you need to see what
it does that's different your own code.

Also, don't forget Jerry French's suggestion of attempting to manually
delete it. Maybe it's just protected

Tony Proctor
Post by Jerry West
The example appears to enumerate through all the cache files. I was hoping
to simply enter the specific path of a cache entry and delete it without the
need to loop through the entire cache. Anyone know if this is possible?
Thanks,
JW
Post by Tony Proctor
You don't need to pair up any "\" characters in VB Jerry. Try playing with
http://groups.google.ie/group/microsoft.public.vb.general.discussion/msg/bda75aa7b34e6248?hl=en&
Post by Jerry West
Post by Tony Proctor
Tony Proctor
Post by Jerry West
I have a single file in the IE cache I want deleted. I am using
l& = DeleteUrlCacheEntry("C:\Documents and Settings\user\Local
Settings\Temporary Internet Files\file.cab")
I always get back an error of 2 indicating that the file cannot be found.
If
Post by Jerry West
I open Windows Explorer and view the path I see that the file is indeed
there. Is there another method to using this API other than the example I
show here? Is what I am doing not possible?
Thanks,
JW
Loading...