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

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!
Eduardo FuerteDeveloper and AnalystAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Daniel PineaultPresident / Owner CARDA Consultants Inc.Commented:
What language are you working in?
Steve KnightIT ConsultancyCommented:
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:

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.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
NorieAnalyst Assistant Commented:

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.
Your Guide to Achieving IT Business Success

The IT Service Excellence Tool Kit has best practices to keep your clients happy and business booming. Inside, you’ll find everything you need to increase client satisfaction and retention, become more competitive, and increase your overall success.

Jan Karel PieterseExcel and VBA ExpertCommented:
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 AnalystAuthor Commented:

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 AnalystAuthor Commented:
Thanks for help!
Arvind KumarCommented:
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 AnalystAuthor Commented:
I see it now. Powerful!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Office

From novice to tech pro — start learning today.