Solved open a csv file, add two lines and sane the file

November 13, 2013 at 03:33:57
Specs: Windows 2003
I need to add lines in my batch code to open a csv file add two lines on the start of the csv and save the csv file.

See More: open a csv file, add two lines and sane the file

Report •


#1
November 13, 2013 at 05:19:49
✔ Best Answer
::====== script starts here ===============
::
:: add2csv.bat 2013-11-13 20:15:41.15
@echo off & setLocal enableDELAYedeXpansioN
> new.csv echo. first line
>> new.csv echo. second line
>> new.csv type my.csv
::====== script ends here =================

=====================
M2 Golden-Triangle


Report •

#2
November 13, 2013 at 05:21:24
echo line one>>newfile.csv
echo line two>>newfile.csv
type oldfile>>newfile.csv
::check oldfile to newfile transfer then change echo to rename
echo newfile.csv oldfile.csv
::please retain backup of data till check mildly tested only

edit: too slow as usual, apologies for the duplicate

::mike

message edited by mikelinus


Report •

Related Solutions


Ask Question