Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Locate file in foxpro
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00141989
Message ID:
00142328
Views:
33
>>>>Just wondering if anyone out there known or have written code to locate a file within the foxpro environement. Basically, I am looking for a function that when i give it a file name and it returns the path where the file reside in the current directory.
>>>>
>>>>Any help is appreciated ....
>>>>
>>>>Thanks in advance.
>>>
>>>Do you mean LOCFILE() or GETFILE()?
>>
>>I know the fullpath() command but it is not what i am looking for... Basically,
>>if i know the name of a file but yet dont know where it is in the directory. It is similar to the search command in file mananger where you type in a file name and it returns all the files found in the search path ....
>
>
>You can use LOCFILE() to display a dialog or build your own file find using
>ADIR().

Hi Craig,

I'd be careful using ADIR() under VFP 5.0 or before with on a machine supporting long file names. If, for example, you do a search for all text files using "*.txt", if a file exists with multiple periods in it (eg. mytextv.1.txt), it won't be included in the returned array. This problem is corrected in 6.0.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform