Below is a VB function to return a valid file name,
Protected Function ValidFileName(ByVal FileName As String) As String
Dim rgPattern as String = "[\\\/:\*\?""'<>|]"
Dim objRegEx As New Regex(rgPattern)
Return objRegEx.Replace(FileName, "-")
End Function
No comments:
Post a Comment