General information
Category:
Forms & Form designer
Just an FYI - the FILE() statement caused me problems in my last application update. the file I was checking for was at the root level of a drive (not a subdirectory) and was also in the PATH. under these conditions FILE() always returns .T.
FILE('c:\myfile.txt') will return .T. if mytext.txt is in the path. even if c:\myfile.txt does not exist. a work around was suggested below. since it changes the PATH to nothing, myfile.txt is guaranteed not to be in the PATH.
* lcfile is the file to check for in the root
lcpath = SET('PATH')
SET PATH TO
? FILE()
SET PATH TO (lcpath)
Brenda
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only