in reply to insert filename into multiple tab delimited files

I'm a little confused as to your goal. "Insert a new column that contains the filename". Does that mean that you want to create a new column (field) and for each row (record) insert the filename as the value for that column? That doesn't make a lot of sense to me, but assuming that's what you want to do, just open the file, append a tab and the column name onto the first line and append a tab and the file name onto each succeeding line.
  • Comment on Re: insert filename into multiple tab delimited files

Replies are listed 'Best First'.
Re^2: insert filename into multiple tab delimited files
by eagleroy (Initiate) on Jul 05, 2006 at 22:46 UTC
    Yes, I need to put the filename in the file because it will eventually land on a mainframe system without the original file name, but I need to be able to reference back to the original file name it had in the windows directory Thanks