Because you have to add the text at the top of the file there really isn't a 
"non-clunky" way to do this. This is what I do when I need to add a header row 
to CSV files (although I do it in PowerShell, it's effectively the same thing).

Regards,

Michael B. Smith
Consultant and Exchange MVP
http://TheEssentialExchange.com

From: David Lum [mailto:[email protected]]
Sent: Wednesday, October 26, 2011 3:54 PM
To: NT System Admin Issues
Subject: Insert into beginning of CSV file

I have a .CSV export that I need to insert a line into the beginning of it. My 
solution is to have a batch file that copies a file with what I need (the batch 
file simply has "copy filea.txt+file1.csv readytoftp.csv)

Filea.txt has the line I need to add
file1.csv is the export (from ADFIND)
readytoftp.csv is the file that's ready to ship

This works fine but strikes me as overly clunky, is there a more elegant way to 
add to the front of a .CSV file?
David Lum
Systems Engineer // NWEATM
Office 503.548.5229 // Cell (voice/text) 503.267.9764


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
[email protected]<mailto:[email protected]>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to [email protected]
with the body: unsubscribe ntsysadmin

Reply via email to