Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do you concatenate two text files using VFP?
Message
De
30/06/2007 22:22:07
 
 
À
30/06/2007 20:21:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01237015
Message ID:
01237020
Vues:
17
Hi Robert.

If I didn't want to bother with error checking I'd go with something like this -

StrToFile(FileToStr("ABC.TXT") + FileToStr("DEF.TXT"), "Output.txt")

Of course you probably want to wrap some error checking around that. :-)

Ian Simcock.


>What is the easiest way in VFP to concatenate two text files together? For instance, I would like to combine files: ABC.txt with file DEF.txt into a third file.
>
>File ABC.TXT =
>A data
>B data
>C data
>
>File DEF.TXT =
>D data
>E data
>F data
>
>The result file should contain ...
>A data
>B data
>C data
>D data
>E data
>F data
>
>I've used the DOS !COPY ABC.TXT+DEF.TXT command but this is clunky.
>
>Thanks,
>Robert
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform