Forum Discussion

Nathan Wendel's avatar
Nathan Wendel
Copper Contributor
Jul 27, 2018
Solved

Combining Text Files Into Single CSV

Hi, I have a business situation where I have to combine several TXT files into one CSV. I'm looking for a way to automate the process of combining them as much as possible, even if it means a 3rd par...
  • SergeiBaklan's avatar
    Jul 28, 2018

    Hi Nathan,

     

    Are you on Windows or on Mac?

    Assuming all you csv file are in one folder for Windows you may use command line like

    copy *.csv output.csv

    to combine all files. The only point first row of each file will be kept within the resulting file, but most probably you may find more complicated command to resolve that.

    I believe something similar shall be for Mac, that is Unix after all.

     

    For Windows you may use Power Query to combine and transform, if necessary, all your files in one resulting Excel table, copy of that resulting file you may save as csv. See, for example, https://www.myonlinetraininghub.com/power-query-get-files-from-a-folder.

     

    Not sure if Power Query is available for Mac now.

Resources