MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Gluing file together

  • To: mathgroup at smc.vnet.net
  • Subject: [mg93585] Gluing file together
  • From: Giacomo De Gerolamo <jackdege at katamail.it>
  • Date: Sun, 16 Nov 2008 07:03:52 -0500 (EST)

Hello !!

I have some text file to glue together;
I have been experimenting with following code
(where xxx is for Lines, Text, Binary ...,)
for a lot of time but it each and every time it
mess up the output file (splitting lines and adding
unwanted characters).

Please, can you explain the reason why ?

SetDirectory[NotebookDirectory[]]

fileList=FileNames["*.txt"];
fileNumber=Length[fileList];

For[
   file=1,
   file<=fileNUmber,
   file++,
     tmp=Import[fileList[[file]],"xxx"];
     str=OpenAppend["out.txt"];
     Write[str,tmp];
     Close[str];
]


Giacomo De Gerolamo
(Italy)


  • Prev by Date: Re: Plot descending x- Values
  • Next by Date: Re: Visulizing the content of a variable
  • Previous by thread: Re: Creating a Banner for presentation
  • Next by thread: RE: Gluing file together