Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Read file from disk, not from exe
Message
From
28/07/2009 15:51:05
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Miscellaneous
Thread ID:
01414757
Message ID:
01415161
Views:
49
>Thanks Borislav. That's what I ended up doing; copied the disk file to a temp file, then read the temp. However, there's no clear way to determine if the original disk file is there, since all VFP native functions refer to the file within the exe. Therefore, COPY or RENAME have to be used within TRY ... ENTRY, or any other exception/error handling structure.

You need a naming convention, then. Prefix the filenames of such files that you want copied out, i.e. the disk version should be named differently from the in-exe original, and prefixing (or having a different extension, perhaps) is a simple way to do that.

Just tried now:

?juststem("a.b.c")

returns a.b - so, you can add an extra extension to the in-exe file, and just strip that extension when you want it on disk.

p.s. "naming convention" is when we all gather in a hotel, drink and invent names.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform