Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

VB and working with IE bookmarks

Options
  • 04-01-2003 3:52pm
    #1
    Closed Accounts Posts: 8,264 ✭✭✭


    I want to write a little VB app to sort out my IE bookmarks. Anyone know, or has sample code, that can get the properties of IE bookmarks etc.


Comments

  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    An IE Internet shortcut file appears to essentially be just a text file. For example, ofr this page I got one that read:
    [DEFAULT]
    BASEURL=http://www.boards.ie/vbulletin/showthread.php?s=&threadid=75664
    [InternetShortcut]
    URL=http://www.boards.ie/vbulletin/showthread.php?s=&threadid=75664
    Modified=601908BD16B4C201CB
    
    As such you could alter the attributes of the file by reading/writing to it using:
    Open strShortcut For Input As #1
    
    ...and...
    Open strShortcut For Output As #1
    
    As for renaming the file you might use code such as:
    FileSystem.FileCopy strOldShortcut, strNewShortcut
    FileSystem.Kill strOldShortcut
    
    There's probably a bit more to it than this, but with a bit of trial and error, you'll figure it out.


  • Closed Accounts Posts: 8,264 ✭✭✭RicardoSmith


    Thanks for the info, someone else has just told me that too. Its too easy! Doh! I thought I was going to need an api or something. Finally going to whip my bookmarks into shape!


  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    In fairness, I think there may be a little more to it than that as I should be able to create a Fav file with Notepad. However, as Fav files don’t appear to have extensions, they are not automatically recognised when I create them thusly.

    My guess is there’s a bit more to them (they’re registered with Windoze upon creation, or some such), but I suspect you’ll be able to find that out with a little Googling.

    Anyhow, hope I helped.


  • Closed Accounts Posts: 9,314 ✭✭✭Talliesin


    Originally posted by The Corinthian
    However, as Fav files don’t appear to have extensions, they are not automatically recognised when I create them thusly.

    Fav files are .url files, the same files you get when you drag a link to a folder, etc.

    The .url extension isn't shown, even when you shell is set to always show extensions. The same is true of .lnk (shortcut) files. Indeed the concept is very much that .url files are a variant of .lnk files (hence they are referred to as "Internet Shortcut" files), and some of the APIs etc. for shortcuts can also be used with them.


  • Closed Accounts Posts: 8,264 ✭✭✭RicardoSmith


    Ok thanks. Thats a useful tack I can use in dealing with them.


  • Advertisement
  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    Originally posted by Talliesin
    Fav files are .url files, the same files you get when you drag a link to a folder, etc.

    The .url extension isn't shown, even when you shell is set to always show extensions. The same is true of .lnk (shortcut) files. Indeed the concept is very much that .url files are a variant of .lnk files (hence they are referred to as "Internet Shortcut" files), and some of the APIs etc. for shortcuts can also be used with them.

    So what happens if I make a link myLink.txt.url ?

    Isn't that a bit of a security risk?


  • Closed Accounts Posts: 9,314 ✭✭✭Talliesin


    Shortcuts (Internet or not) do carry a slight risk of being used to impersonate file types other than those they actually point to (more so if you set the icon to one other than the default, which you can do).

    However they don't work against basic good security practices.


Advertisement