private static string CreateValidFileName( string Filename )
{string invalidChars = Regex.Escape( new string( Path.GetInvalidFileNameChars() ) );
string invalidReStr = string.Format( @"[{0}]+", invalidChars );
return Regex.Replace( Filename , invalidReStr, "_" );}
Showing posts with label validate file name. Show all posts
Showing posts with label validate file name. Show all posts
Wednesday, May 4, 2011
Removing invalid characters from file name and making file valid.
Subscribe to:
Posts (Atom)
Featured Posts
Kali Linux Remote Desktop: Access GNOME from Windows Using Native RDP
Kali Linux + GNOME 50 + GNOME Remote Desktop + Windows Remote Desktop (MSTSC) Getting a full GNOME desktop remotely on Kali Linux can be ...
-
public struct CoOrds { public int x, y; public CoOrds( int p1, int p2) { x = p1; y = p2; } }
-
LM Studio Overview LM Studio is a desktop application designed for developing and experimenting with large language models (LLMs)...