in reply to concatenate directories and files into one csv

from open:

If MODE is '>', the file is truncated and opened for output, being created if necessary. If MODE is '>>', the file is opened for appending, again being created if necessary.

You're opening and truncating when you want opening and appending. This, BTW, is being done iteratively rather than recursively as was mentioned in the CB.

  • Comment on Re: concatenate directories and files into one csv