General information
Category:
Coding, syntax & commands
If no directory is specifed or the searched file is at the root (in your case), File() will look in all paths set with SET PATH. You can argue weither it's a bug or a feature, but I'm sure that MS think that it's a feature.
ADir() will do what you want to do.
>I have the same problem, although I'm getting different results.
>If I use File("A:\mastco.dbf") I get a result of .T., since the file is found along the VFP path. I've also tried File("c:\mastco.dbf") and File("D:\mastco.dbf") {a Zip drive}.
>
>I'm working on a backing up process that can be put in the root of A: or D:, or a network drive (f:\ is actually a sub-directory, but mapped as a drive). The backup set can't be located in any valid data directory, so I need this to work. I can use if adir("A:\mastco.dbf") <> 0 or lcText=locFile("A:\mastco.dbf") and compare lcText with the path I send, but I get really tired of writing around VFP.
Previous
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