in reply to concatenate directories and files into one csv
You open the file for reading instead of appending.