<div dir="ltr"><div><div><div>Here is my attempt to merge 10 files stored in a folder into a single file :<br><br>import csv <br><br>with open("C:\Users\inshu.chauhan\Desktop\test.arff", "w") as w:<br>    writer = csv.writer(w)<br>
    for f in glob.glob("C:\Users\inshu.chauhan\Desktop\For Model_600\*.arff"):<br>        rows = open(f, "r").readlines()<br>        writer.writerows(rows)<br><br><br></div>Error: <br><br>Traceback (most recent call last):<br>
  File "C:\Users\inshu.chauhan\Desktop\Mergefiles.py", line 3, in <module><br>    with open("C:\Users\inshu.chauhan\Desktop\test.arff", "w") as w:<br>IOError: [Errno 22] invalid mode ('w') or filename: 'C:\\Users\\inshu.chauhan\\Desktop\test.arff'<br>
<br></div>Why my programme is not working ?? :(<br><br></div>Thanks in Advance !!<br><br><br><br></div>