[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
FILEVALID()
Tests whether a string has a valid file name
------------------------------------------------------------------------------
Syntax
FILEVALID(<cFileName>) --> lValid
Argument
<cFileName> Designates the file name you want to test for validity.
Returns
FILEVALID() returns .T. when the designated name is valid.
Description
FILEVALID() determines if a string contains a valid file name. You
could also test the validity of user input in this way. If necessary,
path and drive designations must be removed from the string. The
tokenizer described in the string chapter is available for this purpose
(see Examples).
Example
The last token in a string with drive and path designations should
contain the file name:
ACCEPT "Target_File " TO cVar
cFileName := TOKEN(cVar, " \:") // Last token
DO WHILE .NOT. FILEVALID(cFileName)
* Error message ...
ACCEPT "Target_File " TO cVar
cFileName := TOKEN(cVar, "\:") // Last token
ENDDO
See Also:
TOKEN()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson