a bookmarks file reader

Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
5 posts Page 1 of 1
Contributors
User avatar
dan2130
VIP - Donator
VIP - Donator
Posts: 104
Joined: Sat Sep 26, 2009 3:39 am

a bookmarks file reader
dan2130
Hi , i want to create a system to import all the internet explorer bookmarks automaticly in one of my next service but i dont know hot to really get the good string for the URL and the string with the name
here is an example of bookmarks file content :

[DEFAULT]
BASEURL=http://www.codenstuff.com/forum/home.php
[InternetShortcut]
URL=http://www.codenstuff.com/forum/home.php
Modified=E0B4FE5C952FCB017E
IconFile=http://www.codenstuff.com/favicon.ico
IconIndex=1

the strings i want to extract is the string with the URL and the iconFile string and the title of the file.
thanks in advance for your help
have a nice day !
admin@adosrv.net
Owner of ado-srv.net softwares network.
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: a bookmarks file reader
mandai
Since a URL shortcut is just a text file you can use this to search through the lines:
Code: Select all
        Dim lines As String() = File.ReadAllLines("link.url")

        Dim url As String = ""
        Dim ico As String = ""
        For i As Integer = 0 To lines.Length - 1
            If lines(i).StartsWith("BASEURL=") Then
                url = lines(i).Remove(0, 8)
            ElseIf lines(i).StartsWith("IconFile=") Then
                ico = lines(i).Remove(0, 9)
            End If
        Next

        MsgBox("URL is: " & url)
        MsgBox("Icon is: " & ico)
User avatar
dan2130
VIP - Donator
VIP - Donator
Posts: 104
Joined: Sat Sep 26, 2009 3:39 am

Re: a bookmarks file reader
dan2130
thanks i will try that now
admin@adosrv.net
Owner of ado-srv.net softwares network.
Lewis
Coding God
Coding God
Posts: 1564
Joined: Sun Dec 20, 2009 2:12 pm

Re: a bookmarks file reader
Lewis
Mandai, have i ever told you? Your brilliant!
Image
User avatar
dan2130
VIP - Donator
VIP - Donator
Posts: 104
Joined: Sat Sep 26, 2009 3:39 am

Re: a bookmarks file reader
dan2130
yeah he are verry brillant that work !
admin@adosrv.net
Owner of ado-srv.net softwares network.
5 posts Page 1 of 1
Return to “Tutorial Requests”