I have tried to find a solution to my problem, but can´t find the solution I am looking for, so hopefully, someone in here can help me.
I have millions of .csv files that I need to merge by a wildcards match on the file name, the merged .csv file needs to be divided by some of the filenames and only contain one header.
Let´s say I have the following files.
What I need. Is something that can match some of the filename 00017771 merge it with all the other files in the folder that contains 00017771 and only keep one header for all the merged data.
When done with 00017771 it should move on to the next 00013333 and so on.
I think I need to set something that knows what I am looking for in the file name, is the second _ in the filename, and ends with the third _
Hope this is not too confusing