Click here to Skip to main content
15,887,881 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello to all!
I need a thing that may seem strange: I need to get the url of some cached files in IE :D
I've used a FileSystemWatcher to monitor the cache folder so it fires an event when certain files are created. This way I can have full file path, now I have to get their URLs

Basically, you can assume I want my program to write on a file the URL of every .jpg that's created in the Temporary Internet Files folders
Posted
Updated 1-Nov-11 4:37am
v2

you can generate URL of any file, if the file is inside your website directory (virtual directory). otherwise not,

Example:
My project Directory is.
D:\ApplicationDir\MyWebiste1.

root url is http://mywebsiteserver.com/index.aspx (the index.aspx page is inside MyWebsite1 folder, it means its a root)

if the File path is
D:\ApplicationDir\MyWebiste1\Folder1\File.txt

the URL will be http://mywebsiteserver.com/folder1/file.txt

to generate this path programatically, you need to do some string divisions and concatinations. like remove "D:\ApplicationDir\" from file path and concatenate "http://mywebsiteserver.com/" after the remaining file path. replace '\' with '/'.

its a rough idea.. hope it will help you to think a full solution for you...

mark as answer if solves your problem.
 
Share this answer
 
Comments
Fabio Di Peri 1-Nov-11 10:09am    
Mine is a standard console application that runs on my pc :D I want it to get the url of a file already present in the IE Cache... Basically, you can assume I want my program to write on a file the URL of every .jpg that's created in the Temporary Internet Files folders
I used wininet.dll to get url of every entry in the cache and then searched for the file I was looking for
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900