Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copying a file from inside the exe
Message
 
To
27/04/2010 11:42:25
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01462223
Message ID:
01462225
Views:
99
This message has been marked as the solution to the initial question of the thread.
>Hi All,
>
>My exe app has a txt file contained within it. How do I copy it out to the users hard disk? It keeps looking for the original file along the original path when I compiled the exe file.
>
>TIA,

You could extract it from the EXE using STRTOFILE and FILETOSTR functions:
STRTOFILE(FILETOSTR("TXTWithinTheExeFileName.TXT"),"ExternalName.TXT")
But that will not resolve your problem. VFP searches first in the EXE and then in the path. So you must include that file with Different name in the EXE.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform