Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Read file from disk, not from exe
Message
From
27/07/2009 17:55:12
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Miscellaneous
Thread ID:
01414757
Message ID:
01414901
Views:
39
>I have a config.fpw included with the exe as a text file in the project/other section. In the exe I have a function that needs to read the content of another disk file, in a different folder. The disk file happens to be named config.fpw as well, yet VFP functions (FILE(), FREAD(), etc) keep reading the content of the config.fpw file from the exe, even though I pass the file name with the complete path.
>There must be a way to force VFP to read the file from disk, right? TIA

Besides the other solutions you could use the WSH ActiveX control or even the Windows API of OpenFile, ReadFile. The WSH ActiveX control might now always be installed but the Windows API should always work.
Charles

"The code knows no master." - Chuck Mautz
"Everybody is ignorant, only on different subjects." - Will Rogers
Previous
Reply
Map
View

Click here to load this message in the networking platform