<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Feb 20, 2013 at 12:04 PM, Dave Angel <span dir="ltr"><<a href="mailto:davea@davea.name" target="_blank">davea@davea.name</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 02/20/2013 05:38 AM, inshu chauhan wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
On Wed, Feb 20, 2013 at 11:26 AM, Roland Koebler <<a href="mailto:r.koebler@yahoo.de" target="_blank">r.koebler@yahoo.de</a>> wrote:<br>
<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<snip><div class="im"><br>
<br>
If you only want to concat the files, I would use some shell-tools,<br>
like "cat" on Linux or "copy" on Windows, so<br>
<br>
copy C:\Users\inshu.chauhan\<u></u>Desktop\ForModel_600\*.arff<br>
C:\Users\inshu.chauhan\<u></u>Desktop\test2.arff<br>
<br>
should do it.<br>
<br></div>
  <snip><br>
<br>
</blockquote><div class="im">
Yes I just want to concat the files , not parse/mangle the files.  How can<br>
i simply read all files in a folder in my computer and write them into a<br>
single file ? just by 'printf ' is it possible ?<br>
<br>
<br>
<br>
</div></blockquote>
<br>
Reread Roland's message, quoted above for your convenience.<br>
<br>
Not sure what you mean by printf.  Why would you use C to do it?<br>
<br>
If you need to do it in Python, remember you can read a file with the read() method, and write one with the write() method.  They pay no attention to newlines, delimiters or anything else.  Just create the output file, then in a loop open the input files and loop through each (read doesn't necessarily get the whole thing in one pass)<br>

<br>
You'll spend lots more energy on the mechanics of finding the files then on the copying.  But perhaps the shutil module will have some further shortcuts.<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
DaveA<br>
-- <br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/<u></u>mailman/listinfo/python-list</a><br></font></span></blockquote><div><br></div><div>You are right Dave, printf was a blunder <br>
 <br></div></div><br></div></div>