PRB: FoxPro FILE() Function Returns Wrong Results on NetworkLast reviewed: June 27, 1995Article ID: Q95373 |
The information in this article applies to:
SYMPTOMSWhen you use the FILE() function to test for the existence of a network directory, a logical true (.T.) is always returned regardless of the actual existence of the directory.
RESOLUTIONTo work around this problem, use the ADIR() function. For example:
IF ADIR(test,'Z:\mydir\*','D') <> 0 WAIT WIND "Z:\mydir exists" ENDIFThis example assumes that the array "test" has not yet been defined. If the ADIR() function returns a number greater than zero, then the directory exists.
MORE INFORMATIONUsing the FILE() function in this way has been found to be unreliable on network drives. The syntax of the command is:
?FILE('Z:\mydir\nul') |
Additional reference words: FoxDos FoxWin 2.00 null 2.50 2.50a
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |