How to get URL adress from "My favorites" files ?

  • Thread starter Thread starter Przemek
  • Start date Start date
P

Przemek

Hi.
I'd like to get URL from any link file placed in "My Favorites" web browser
folder (as I see - that's shortcut files). How can I do it?
Thanks for wrote, nice sunny day with no work:).
 
Still nothing - I can't do it.
There is a TreeView control in this example and author using Tag property -
I have no control and - no tag. All I have is path to file selected from
OpenFileDialog.
Hov can I get chosen file URL?
Thanx for example and wrote.
 
For vb.net I use this

set a reference to Windows Script Host Object Model which is in
c:\winnt\system32\wshom.ocx

Imports wsh = IWshRuntimeLibrary

Dim wshShell As New wsh.WshShell
Dim urlShortcut As wsh.WshURLShortcut
dim myURL, sPath as string

'sPath is the favorite's filename with path

urlShortcut = CType(wshShell.CreateShortcut(sPath), wsh.WshURLShortcut)
myURL = urlShortcut.TargetPath
 
Back
Top