Announcement

Collapse
No announcement yet.

Delete first four lines form a text file using batch script

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Delete first four lines form a text file using batch script

    Hi every body. First of all I am new to bachting. I can get the hang if it quickly though with some help and quidance. I need to delete the first 4 heading lines of hundreds of data files

    The data or text files that look like this:

    (Say I name this USR1.dat)

    "TOA5","38173","CR1000","38173","CR1000.Std.21.06" ,"CPU:WindSpot-Po
    "TIMESTAMP","RECORD","BattV_Avg","BattV_Max","Batt V_Min","BattV_Std
    "TS","RN","Volts","Volts","Volts","Volts","met ers/second","meters/s"
    "","","Avg","Max","Min","Std","Avg","Max","Min","S td","WVc","WVc","
    "2011-08-05 02:00:00",4144,12.64,12.64,12.61,0.004,4.276,7.656 ,
    "2011-08-05 02:10:00",4145,12.63,12.64,12.61,0.004,4.233,7.609 ,
    "2011-08-05 02:20:00",4146,12.63,12.63,12.6,0.004,4.401,7.5130 0
    "2011-08-05 02:30:00",4147,12.63,12.63,12.6,0.005,4.297,7.561, 2
    "2011-08-05 02:40:00",4148,12.63,12.63,12.6,0.005,4.262,6.844, 2
    "2011-08-05 02:50:00",4149,12.62,12.63,12.59,0.006,4.781,8.61, 2
    "2011-08-05 03:00:00",4150,12.62,12.62,12.58,0.005,4.011,7.274 ,
    "2011-08-05 03:10:00",4151,12.62,12.62,12.59,0.005,4.533,7.083 ,
    "2011-08-05 03:20:00",4152,12.61,12.62,12.58,0.006,5.144,8.47, 2
    "2011-08-05 03:30:00",4153,12.61,12.62,12.57,0.004,4.627,8.66, 2
    "2011-08-05 03:40:00",4154,12.61,12.61,12.58,0.004,4.424,6.51, 2
    "2011-08-05 03:50:00",4155,12.61,12.61,12.57,0.005,4.274,7.226 ,
    "2011-08-05 04:00:00",4156,12.6,12.61,12.57,0.005,4.613,6.9400 0
    "2011-08-05 04:10:00",4157,12.6,12.61,12.57,0.006,3.869,6.844, 1


    I want it to look like this: ( with a different name; perhaps USR1a.dat)

    "2011-08-05 02:00:00",4144,12.64,12.64,12.61,0.004,4.276,7.656 ,
    "2011-08-05 02:10:00",4145,12.63,12.64,12.61,0.004,4.233,7.609 ,
    "2011-08-05 02:20:00",4146,12.63,12.63,12.6,0.004,4.401,7.5130 0
    "2011-08-05 02:30:00",4147,12.63,12.63,12.6,0.005,4.297,7.561, 2
    "2011-08-05 02:40:00",4148,12.63,12.63,12.6,0.005,4.262,6.844, 2
    "2011-08-05 02:50:00",4149,12.62,12.63,12.59,0.006,4.781,8.61, 2
    "2011-08-05 03:00:00",4150,12.62,12.62,12.58,0.005,4.011,7.274 ,
    "2011-08-05 03:10:00",4151,12.62,12.62,12.59,0.005,4.533,7.083 ,
    "2011-08-05 03:20:00",4152,12.61,12.62,12.58,0.006,5.144,8.47, 2
    "2011-08-05 03:30:00",4153,12.61,12.62,12.57,0.004,4.627,8.66, 2
    "2011-08-05 03:40:00",4154,12.61,12.61,12.58,0.004,4.424,6.51, 2
    "2011-08-05 03:50:00",4155,12.61,12.61,12.57,0.005,4.274,7.226 ,
    "2011-08-05 04:00:00",4156,12.6,12.61,12.57,0.005,4.613,6.9400 0
    "2011-08-05 04:10:00",4157,12.6,12.61,12.57,0.006,3.869,6.844, 1


    Is there a batch script possible for this?

    I will appreciate your help very much!

    fernando
Working...
X