Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
lcFilename = ALLTRIM(this.Value)
For xx = 1 to len(lcFilename)
lcChar = substr(lcFilename,xx,1)
IF asc(lcChar)=39 OR asc(lcChar)=42 OR asc(lcChar)=44 ;
OR asc(lcChar)=47 OR asc(lcChar)=59 OR asc(lcChar)=61;
OR BETWEEN(asc(lcChar), 91, 93) OR asc(lcChar)=96
MESSAGEBOX("INVALID CHARACTER FOUND. ",16,"INVALID")
lcReplace=STRTRAN(lcFilename, lcChar)
this.Value=lcReplace
this.selstart=xx-1
ENDIF
ENDFOR
lcFilename = "C:\TESTFILE.EXE"
For xx = 1 to len(justfname(lcFilename))
lcChar = substr(lcFilename,xx,1)
if between(asc(lcChar),65,90) or between(asc(lcChar),97,122)
else
?lcChar
messagebox("INVALID CHARACTER FOUND. ",16,"INVALID")
endif
if xx > 12
messagebox("INVALID FILENAME LENGTH FOUND. ",16,"INVALID")
endif
endfor
FUNCTION StripInvalidChars
* Removes all invalid characters from a filename
* and replaces them with underscores.
LPARAMETERS tcIn
LOCAL lcBadChars
lcBadChars = [<>:"/\|?*]
RETURN CHRTRAN(tcIn, lcBadChars, REPLICATE("_", LEN(lcBadChars)))