Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Use of second parameter in File()
Message
From
04/04/2006 11:24:25
 
 
To
04/04/2006 04:39:22
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01110144
Message ID:
01110289
Views:
11
>be aware that the file() function can be somewhat dangerous, because it will always search the VFP path, even though you may specify a directory. So file('c:\temp\temp1\temp2\yourfile.txt') will actually return true even if yourfile.txt does not exist in c:\temp\temp1\temp2\, as long as yourfile.txt exists in one of the directories in your path setting. Adir(dummy,'c:\temp\temp1\temp2\yourfile.txt')>0 is always safe.

Thanks
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform