Computing.Net > Forums > Programming > Batch file-add column names to CSV

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Batch file-add column names to CSV

Reply to Message Icon

Name: renegade01
Date: October 19, 2007 at 05:49:15 Pacific
OS: windows 2000
CPU/Ram: 1024MB
Product: x
Comment:

Hi guys

Can you please tell me what script to write in a batch file so that it adds column names to a .csv file. So for example I have a file now that comes through as:

1 2
1 3
2 4

but I want these columns to have a name of 'A' and 'B'. Any help appreciated, thanks in advance.

Sham



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: October 19, 2007 at 06:08:43 Pacific
Reply:

@echo off

echo A B > new.csv
type my.csv >> new.csv


=====================================
If at first you don't succeed, you're about average.

M2



0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Batch file-add column names to CSV

Batch File - values from txt to var www.computing.net/answers/programming/batch-file-values-from-txt-to-var/16974.html

Batch File to Change Database .ini www.computing.net/answers/programming/batch-file-to-change-database-ini/14429.html

Need batch file to delete old files www.computing.net/answers/programming/need-batch-file-to-delete-old-files/14092.html