This is my first post

I have 10 CSV files which I want to Merge which I have so far done by c:\type *.csv >> mergedfile.dat
***************FIRST PROBLEM*************************
The problem is I want to edit each csv file before it is merged so that the first/last column of the data (in each row) in it contains the filename. So if file XYZ.csv contains
1,2,3
2,3,4
Then I want the data to be,
XYZ,1,2,3
XYZ,2,3,4
***************SECOND PROBLEM*************************
When I use c:\type *.csv >> mergedfile.dat to merge the files I only want the headers from the first file in the batch and not the headers repeating as rows for the later files.
So if ABC.csv contains
H1,H2,H3
1,2,3
and XYZ.csv contains
H1,H2,H3
2,3,4
then mergedfile.dat should be
H1,H2,H3
1,2,3
2,3,4
and NOT
H1,H2,H3
1,2,3
H1,H2,H3
2,3,4
I hope that I have put across my questions clearly

Kindly help.
Respect,
babsdoc