[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
FUNCTION ISVALFILE()
Short:
------
ISVALFILE() Checks a file name for validity
Returns:
--------
<lValid> => is file name a valid dos file name
Syntax:
-------
ISVALFILE(cName,[lCheckDup],[@cMessage])
Description:
------------
Checks the proposed file name in <cName> for
adherance to the dos file naming conventions.
[lCheckDup] will check for existance of the file if
True. Default False.
[@cMessage] a string passed by reference. The reason
for rejection will be placed in the string. Messages returned
are:
"File name is empty"
"Duplicate file exists"
"File name is too long"
"Too many periods"
"Too many characters after the period"
"Too many characters before the period"
"Too many characters with no period"
"Invalid character: " (character)
"Illegal file name"
Examples:
---------
cFn := space(15)
while .t.
cMessage := ""
@10,10 get cFn
read
@20,10 say iif(isvalfile(cFn,.t.,@cMessage),"Valid ","Not Valid")
@21,10 say padr(cMessage,50)
end
Source:
-------
S_ISVALF.PRG
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson