Here is some code that will read in all the URLs in the favorites folder and
put them in a rich text box. It does not take into consideration the URLs
that might be in subfolders of the favorites folder.
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
Dim FavoritesPath As String
FavoritesPath =
System.Environment.GetFolderPath(Environment.SpecialFolder.Favorites)
Dim s As String
Dim MyDirectory As New System.IO.DirectoryInfo(FavoritesPath)
Dim FileArray As System.IO.FileSystemInfo() =
MyDirectory.GetFileSystemInfos()
Dim info As System.IO.FileSystemInfo
Dim sr As System.IO.StreamReader
For Each info In FileArray
If LCase(Microsoft.VisualBasic.Right(info.FullName, 4)) = ".url"
Then
s = s & info.Name & vbCrLf
sr = System.IO.File.OpenText(info.FullName)
Do While sr.Peek <> -1
s = s & sr.ReadLine()
Loop
sr.Close()
s = s & vbCrLf & vbCrLf
End If
Next
Me.RichTextBox1.Text = s
End Sub
Quote:
> Would like to programatically read and write IE Fav's
> can ne1 point me in the right direction
> tia
> meh