Hi,
I would like to have a function to validate filenames.
I took a look at thread "Valid filename" (
http://www.levelextreme.com/DataEntryThreadView.aspx?ID=1502980), also checked
http://www.berezniker.com/content/pages/visual-foxpro/determine-invalid-characters-file-name-and-path, but in there the main concern was about invalid characters, not validating the "syntax" of the path/filename.
To better explain what I mean, below are some examples (for for the sake of clarification I'll put them between "[]").
For instance, [CC//myfile.txt] would pass that validation, but it's not a valid filename.
How can I check if this contruct is valid? [\\servername\dir\subdir\filename], what about if it was written [\servername\dir\subdir\filename] ?
[Y:\My Folder\This is a file name with many spaces.txt]
And filenames with more than one ".": [C:\my file.for.test.txt]
If Windows can check, can we be able too do it? If yes, how?
TIA