8 Replies Latest reply: Apr 4, 2014 6:29 AM by Paul Nockolds RSS

    Concatenate Multiple csv Files with Filenames

    Paul Nockolds

      Hi All

       

      I have over 2000 csv files in a folder all with exactly the same structure and i need to concatenate them all together.

       

      I am thinking i can do something like this as they will auto concatenate but I also need to store in a field the name of the file where each record came from and I am unsure how best to achieve that.  Any advice welcome.

       

      For each File in FileList('$(vPath)\*.csv')

       

      TableName:

      Load

           Field1,

           Field2,

           FieldN

      From $(File);

        

      NEXT