• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Reading IE favorite shortcut url?

 
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I'd like to read the url store in a IE's favorite shortcut.
i.e. the url content of shortcut found under
C:\Documents and Settings\username\Favorites
Would apprecitate anyone can tell me what's the api to do it.
Thanks so much for any advice.
Cheers.

Han Ming
 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi HanMing,
I was interested in your question as I've recently been learning about files, streams, urls etc. so it was a chance for some practice.
I'm not sure if the following is what you're after. It gets an array of files ending with "url" from the favorites directory and prints the name of each file to the screen. Then, it loops through the array, stripping out the first line and a bit, creates a URL and tests a couple of the URL class methods.
The final bit reads the html as text from the webpage represented by a URL and writes each line to the screen.

The program doesn't search any subdirectories, and assumes that the structure of each file is identical. (Would be good to have something that kept on stripping characters till it found the start of a protocol string, but this was ok for starters.)
Eg. of a *.url file from the favorites directory.
~~~~~~~~~~~~~~~~~~
[DEFAULT]
BASEURL=http://www.cms.com.au/
[InternetShortcut]
URL=http://www.cms.com.au/
Modified=E0BB4A8D4268C101DE
~~~~~~~~~~~~~~~~~

cheerio
rowan
[This message has been edited by Rowan Brownlee (edited November 26, 2001).]
 
HanMing Low
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Thanks for the advice.
It's what I'm looking for!!!
Thanks so much.
Cheers.

Han Ming
 
reply
    Bookmark Topic Watch Topic
  • New Topic