Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to copy multiple files into one
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00582015
Message ID:
00582018
Views:
33
>I need to "join" some text files into one, for example
> file1.txt, file2.txt... into filex.txt, is there a way to do this from visual foxpro.
>
>The only way I know is using the COPY command from MS-DOS,
> !COPY file1.txt+file2.txt filex.txt
>
>I'd like to find another way.
>
>Thanks

You can use Filetostr() and Strtofile() functions.
Erase ("filex.txt")
Strtofile( Filetostr('file1.txt"), "filex.txt"), .t.)
Strtofile( Filetostr('file2.txt"), "filex.txt"), .t.)
...
Strtofile( Filetostr('filen.txt"), "filex.txt"), .t.)
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform