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)
- Follow-Ups:
- RE: Gluing file together
- From: "David Annetts" <davidannetts@aapt.net.au>
- RE: Gluing file together