Could you point a way to join multiple .CSV(s) files into one?

Eduardo Fuerte
Eduardo Fuerte used Ask the Experts™
on
Hi Experts

Could you point a way to join multiple .CSV(s) files into one?

I had tried  to use TXTCollector but it doesn't work fine everytime.

Sometimes this error occurs:
[Error] - File could not be written...

Open in new window


Amazingly the files were generated the same way.

Thanks in advance!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Daniel PineaultPresident / Owner CARDA Consultants Inc.
Distinguished Expert 2018

Commented:
What language are you working in?
Commented:
They are only text files.... you can combine that by using OS / batch command for instance before doing whatever it is with them... e.g. here quick script of mine which takes the first CSV file it finds and then adds all but the first line of the rest of the CSV files in a directory - to remove header line from the top for instance:

http://scripts.dragon-it.co.uk/links/batch-combine-csv-files

But as Daniel says what language do you want, or where are you then trying to process them -- could read them all directly into excel etc.

Steve
NorieAnalyst Assistant

Commented:
Eduardo

If you are using Excel then, depending on which version you have, you could use Power Query to 'join' the CSV files into one file.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Jan Karel PieterseExcel and VBA Expert

Commented:
If you use Excel 2o16 you can use Data tab, New Query button (or Get Data button, depends on your exact version), From File, From Folder.
Eduardo FuerteDeveloper and Analyst

Author

Commented:
Hi

The reason I had to merge all the .CSV(s) files was to furnish it to another dev team data to be exported to MSSQLServer.
I decided to import every .CSV directly to MSSQLServer by using dbForge for MSSQLServer that gives a very robust importation tool.
I consider your solutions valid paths.
Eduardo FuerteDeveloper and Analyst

Author

Commented:
Thanks for help!
I am not an Expert at all.  Answer could be wrong.
I use software Delimit. It is free to try for a month. I have joined up to 100 GB.
Eduardo FuerteDeveloper and Analyst

Author

Commented:
I see it now. Powerful!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial