comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Append Text
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Append Text [message #40936] Tue, 07 September 2004 08:56
Michael Wallace is currently offline  Michael Wallace
Messages: 409
Registered: December 2003
Senior Member
> Using *nix? If so, from the command line do:
>
> cat File*.txt > NewTextFile.txt


By the way, this won't give you want if you need to have the files
concatenated in numeric order. To have them in numeric order, you'd
have to use a loop of some sort to form the next file name and then
concatenate that file's contents onto the large text file of everything.

-Mike
Re: Append Text [message #40937 is a reply to message #40936] Tue, 07 September 2004 08:52 Go to previous message
Ben Panter is currently offline  Ben Panter
Messages: 102
Registered: July 2003
Senior Member
Rafael Loos wrote:

> Hi, I have more than 1000 txt files and I am trying to put them all
> together in ONE txt file.
>
> The files have similar names just changing the last number ... (File1
> - File1000):
>
> File1.txt
> File2.txt
> File3.txt
> ...
> ...
> ...
> File1000.txt
>
> Is there a easy way to put them all together ?

The easiest way I can think of is in unix:

cat File*.txt > all_text.txt

If you were desperate to use IDL you could read each file in as strings,
then stick 'em together.

Ben

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Ben Panter, Edinburgh, UK
email is false. Use my name (no spaces) at bigfoot which is a com.
Re: Append Text [message #40938 is a reply to message #40937] Tue, 07 September 2004 08:49 Go to previous message
Michael Wallace is currently offline  Michael Wallace
Messages: 409
Registered: December 2003
Senior Member
Using *nix? If so, from the command line do:

cat File*.txt > NewTextFile.txt
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Append Text
Next Topic: Re: IDL and 64bit Linux

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:41:13 PDT 2025

Total time taken to generate the page: 0.00522 seconds