I have many *.txt files in a folder, each file has the same structure:
same four columns but different number of rows in each file.
1.txt
0.00781238 0.00082577 0.00781238 -0.03314453
0.01562476 0.00064219 0.01562476 -0.03145172
0.02343713 -0.00105686 0.02343713 -0.03775329
0.03124951 -0.00016571 0.03124951 -0.00232971
0.03906189 0.00240464 0.03906189 0.04244080
2.txt
0.00781238 -0.00409547 0.00781238 -0.01004241
0.01562476 0.00239794 0.01562476 0.03342835
0.02343713 -0.00112586 0.02343713 0.00152711
0.03124951 0.00374492 0.03124951 0.03581025
0.03906189 0.00124744 0.03906189 -0.01969909
0.04687427 0.00192426 0.04687427 0.05292329
0.05468665 0.00266910 0.05468665 0.02569642
and more txt files from 1 to 65.
I want to have the result like this
Samplename value1 value2 value3 value4
1.txt 0.00781238 0.00082577 0.00781238 -0.03314453
1.txt 0.01562476 0.00064219 0.01562476 -0.03145172
1.txt 0.02343713 -0.00105686 0.02343713 -0.03775329
1.txt 0.03124951 -0.00016571 0.03124951 -0.00232971
...
2.txt
2.txt
...
65.txt