Hi Ken,
I understand your situation here. It is quite difficult to manually remap
the links (e.g. map MS.VSCC to MS.VSCC.2003). So I wrote a C# console
program that may automate your work. The program will enumerate all the
".url" files (which are the bookmark files) in the current folder and
replace the string with the value you specify. Hopefully it may help you
correct these bookmarks.
1. Create a new C# Console application. Clear the existing code and paste
in the code below.
2. Compile the code and generate "ConsoleApplication1.exe".
3. Go to the "\Document and Settings\<user name>\Favorites" and backup the
folder.
4. Copy the "ConsoleApplication1.exe" to the "Favorites" folder.
5. Double click the "ConsoleApplication1.exe"
6. Input the value you want to replace (e.g. "MS.VSCC") and press enter
7. Input the new value (e.g. "MS.VSCC.2003") and press enter
As far as I know, the URL difference between MSDN 2003 and 2002 help sets
may not be as simple as "MS.VSCC.2003 vs. the MS.VSCC ". Please
double-check this.
using System;
using System.IO;
class UpdateURL
{
public static void Main(string[] args)
{
Console.WriteLine("Input the original value to be replaced and press
enter:");
string originalValue = Console.ReadLine();
Console.WriteLine("Input the new value to replace the original and press
enter:");
string newValue = Console.ReadLine();
string[] files = Directory.GetFiles(".", "*.url");
foreach (string fileName in files)
{
Console.WriteLine(fileName);
try
{
String line;
using (StreamReader sr = new StreamReader(fileName))
{
line = sr.ReadToEnd();
sr.Close();
}
line = line.Replace(originalValue, newValue);
using (StreamWriter sw = new StreamWriter(fileName))
{
sw.Write(line);
sw.Close();
}
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
}
}
Regards,
Felix Wang
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security This posting is provided "as is" with no warranties and confers no rights.