I'm using .NET 2.0 Visual Studio 2005 C#.
The code below gets file name of the IE favorites (bookmark) from the directory that contains bookmarked .url files
Example
../users/favorites/blah.url
But what I really want is the bookmarked URL inside of that file.
When check the file property, in the web document tab, it shows filename and URL.
How can I access it from C#?
CODE
//the code below just get String like "..../users/favorites/blah.url"
//call the method with the folder path:
//GetFavoriteFiles(Environment.GetFolderPath(Environment.SpecialFolder.Favorites));
private List<String> favFiles = new List<String>();
private void GetFavoriteFiles(String folder)
{
String[] favs = Directory.GetFiles(folder);
favFiles.AddRange(favs);
String[] folders = Directory.GetDirectories(folder);
if(folders != null)
{
foreach(String s in folders)
{
GetFavoriteFiles(s);
}
}
}