Cy
Tue Jun 26 18:22:39 CDT 2007
Paul Pedersen wrote:
> "Cy Welch" <cywelch@yahoo.com> wrote in message
> news:umLd6W6tHHA.3588@TK2MSFTNGP06.phx.gbl...
>> Paul Pedersen wrote:
>>> I do not believe that is the case. According to the documentation, FoxPro
>>> searches its path only when a path is not specifically included in the
>>> parameter passed to FILE().
>>>
>>> Furthermore, that matches the results of my own testing. For instance,
>>> FILE("myfolder1\myfolder2\myfile.txt") returns .F. even if the file
>>> myfolder1\myfile.txt exists and is in the current path setting.
>>>
>>> LOCFILE() does what you described, but it also will pop up a window
>>> prompting the user to locate the file if it cannot be found.
>> Test by looking for a file in the root directory of ANY drive, and it will
>> look on the path because for some reason the programmers didn't consider a
>> drive letter without additional path (such as "c:" or "c:\") to be a path.
>> IIRC this is not new behavior but have been this way since at least FPD
>> 2.0.
>
>
> Well, I didn't try that. But frankly, to keep files in a root directory
> seems like a bad practice.
>
>
>
I would agree, however that doesn't change the issue with the function.
Additionally it could be the root of a share, which may not actually
be the root of a drive. Where this issue really comes/came in was when
checking for a file on a floppy disk, since typically directories were
not used on them, you were "not providing a path" and FP would check its
path and basically tell you that the file existed on the floppy if it
was on the path, even if it was NOT on the floppy.
--
Cy Welch
Senior Programmer
MetSYS Inc
http://www.metsysinc.com