Computing.Net > Forums > Programming > Batch to edit 1st line of txt file

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 to edit 1st line of txt file

Reply to Message Icon

Name: Learning nerd
Date: February 24, 2009 at 23:52:51 Pacific
OS: Windows XP
Subcategory: Batch
Comment:

I need to edit the header (1st) line of texrt file using bat file.
Please help.



Sponsored Link
Ads by Google

Response Number 1
Name: stephenturns
Date: February 25, 2009 at 00:22:10 Pacific
Reply:

What information do you need to edit? Is it text you want to add or change? Is it for one file only? Is the text you need to edit predefined?

Need some more information...


0

Response Number 2
Name: Learning nerd
Date: February 25, 2009 at 00:39:05 Pacific
Reply:

I have a text file which contains a header.
rest of the data in text file has equal row length. I want to add blank spaces to the header to have same row length as rest.

I want to do this with the help of batch as i cant run a Vb script on the machine.


0

Response Number 3
Name: Mechanix2Go
Date: February 25, 2009 at 05:42:49 Pacific
Reply:

If you want to get this moving post the first few lines.

Or wait for a mindreader.


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

M2


0

Response Number 4
Name: Sen Hu
Date: March 9, 2009 at 07:03:37 Pacific
Reply:


I agree that some more info would have been helpful. But, I will make some assumptions. I wil assume that you want to change
the first line in some file X.txt from something to "A B C". The following commands in biterscripting will do that.

var str content ; cat X.txt > $content
lal "1" "A B C" $content > X.txt

biterscripting is free at http://www.biterscripting.com .


0

Sponsored Link
Ads by Google
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 to edit 1st line of txt file

How to get 1st frame of AVI file/vi www.computing.net/answers/programming/how-to-get-1st-frame-of-avi-filevi/14952.html

Batch to edit a text file www.computing.net/answers/programming/batch-to-edit-a-text-file/15894.html

Add FileName to a series of TXT files www.computing.net/answers/programming/add-filename-to-a-series-of-txt-files-/19981.html