Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FILE() command slow
Message
From
11/08/2008 16:06:32
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01338142
Message ID:
01338153
Views:
17
>Thanks Tore,
>
>What if FILE() only had the path to that directory? ADIR() would still be faster than FILE()? because I could save the path, set the path just to that directory before running the command and then set it back to the saved path after the command.

My comment was partly wrong. If you DO specify a non-blank path, file() is safe, I believe. But if you use file() to check for a file in the root, file() will also check the directories specified in SET PATH. So file(c:\'yourfile.txt') will report .T. even if yourfile.txt is NOT in c:\, but in any of the other directories in the SET PATH setting. Anyway, I always use adir() or sys(2000), but I can't tell which is fastest. I suggest that you try them out.
Previous
Reply
Map
View

Click here to load this message in the networking platform