Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Read file from disk, not from exe
Message
De
28/07/2009 15:51:05
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Divers
Thread ID:
01414757
Message ID:
01415161
Vues:
48
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform