Computing.Net > Forums > Programming > Add txt to beginning of file in.bat

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.

Add txt to beginning of file in.bat

Reply to Message Icon

Name: jimbo001
Date: October 13, 2008 at 11:30:35 Pacific
OS: XP
CPU/Ram: Pentium IV
Comment:

I know I can append text to a file using ">>". However, is there a way to write to the beginning of the file, instead of appending the text. I would like to do this in a batch file.

Thanks



Sponsored Link
Ads by Google

Response Number 1
Name: StuartS
Date: October 13, 2008 at 12:32:59 Pacific
Reply:

Write the text to a new file. Append the old file to the new one. Delete the old file and rename the new file.

Stuart


0

Response Number 2
Name: jimbo001
Date: October 13, 2008 at 13:27:54 Pacific
Reply:

Thanks very much, that worked perfectly.


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: Add txt to beginning of file in.bat

Sed:Add text to end of line in file www.computing.net/answers/programming/sedadd-text-to-end-of-line-in-file/15109.html

Count number of files in zip archive www.computing.net/answers/programming/count-number-of-files-in-zip-archive/20254.html

Java - Order of files in directory www.computing.net/answers/programming/java-order-of-files-in-directory/14812.html