private string CleanFileName(string fileName)
{
string regexSearch =
new string(Path.GetInvalidFileNameChars()) + new string(Path.GetInvalidPathChars());
Regex r = new Regex(String.Format("[{0}]", Regex.Escape(regexSearch)));
return r.Replace(fileName, "");
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment