FUNCTION MakeFileNameValid(tcFileName) * Removes invalid characters from a file name) RETURN ALLTRIM(CHRTRAN(tcFileName, GetInvalidFileNameChars(), ""), " ", ".") FUNCTION GetInvalidFileNameChars() LOCAL lcInvalidFileNameChars, lnAsc lcInvalidFileNameChars = ["*/:<>?\|] FOR lnAsc=0 TO 31 lcInvalidFileNameChars = lcInvalidFileNameChars + CHR(lnAsc) ENDFOR RETURN lcInvalidFileNameCharsBelow are Windows limitation on file/path pulled from Windows SDK header file
* max. length of full pathname #define _MAX_PATH 260 * max. length of path component #define _MAX_DIR 256 * max. length of file name component #define _MAX_FNAME 256 * max. length of extension component #define _MAX_EXT 256>