|I want to add the numer of the filename in the last column of the file in every row.|
Does this mean you want to add a new column, as the last column in every row? If so do you want a header for the new column added to the header line?
Or do you want to add the number in the filename to the existing last column?
Please come back & tell us if your problem is resolved.