Apart from these characters :
\ / : * ? " < > |
Are all other ASCII characters up to #255 valid for file names?
Printable View
Apart from these characters :
\ / : * ? " < > |
Are all other ASCII characters up to #255 valid for file names?
I think so. The following results in a form named formÿ.frm
FileCopy "C:\temp\form1.frm", "C:\temp\form" & Chr(255) & ".frm"
This may be of interest:
VB Code:
Public Function SafeFileName(ByVal oldFile As String) As String Dim ServDir As String Dim BadChars As String, BadChar As String, x As Long BadChars = "\/:*?""<>|" ServDir = oldFile For x = 1 To Len(BadChars) BadChar = Mid$(BadChars, x, 1) ServDir = Replace(ServDir, BadChar, "_") Next SafeFileName = ServDir End Function
Some code I wrote.