private static string GetNormalizedPath(string path)
{
string filePath = path;
foreach (char ic in System.IO.Path.GetInvalidFileNameChars())
{
filePath = filePath.Replace(ic.ToString(), "-");
}
foreach (char ic in System.IO.Path.GetInvalidPathChars())
{
filePath = filePath.Replace(ic.ToString(), "-");
}
return filePath;
}