Hi, I have many text files in the following format:
Name of the fileDateOther useless dataColumn1 [unit] Column2 [unit] Column3 [unit] Column4 [unit] ...0.025 6.8 9.4 9.5 ...0.050 2.8 4.4 4.2 ...0.075 3.3 7.4 6.1 ......
I would like to copy all the data from all the files into a single file. I am familiar with the command:
!copy a.txt+b.txt ab.txt
However, I would like to remove all header lines and have only the numerical data in the new file (and then put a new header line in the first row so that 'tdfread' can read it easily). I would like my output file to look like this
MyHeader1 MyHeader2 MyHeader3 MyHeader4 ...0.025 6.8 9.4 9.5 ...0.050 2.8 4.4 4.2 ...0.075 3.3 7.4 6.1 ......
Another challenge is that there are several thousands of files, so I would need an automated procedure to read the files after one another. Or alternatively, a way to select all the files in a folder to concatenate. Unfortunately they are not conveniently named so I cannot construct the file names in a for loop for example. Any help is very much appreciated.
Best Answer