Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Does anyone know how to redirect output to a line in a file that already has text on it? I'm using
type test1 >> test2.bat
And it puts the text from test1 on the next line instead of the same line.

Hi,
The reason it adds new info on a new line is because of a eol or cairrage return.If the bat is
cls
@echo off
mdThe above is just an example, with your wanting to add onto the md....md stuff.
To not have a cairrage return when you are typing the bat in notepad do not hit enter after the md It would appear md |
Type md one space and the | represents your cursor. Now just save the file and the eol marker will not be there.
There is also a number of programs that will strip off the eol markers......super for bats that are created by the computer and the eol marker is automatically generated.
I guess I have offered more confusion than help, but I would be glad to lookup and send some programs that strip off eol tags.
World Library

Hi,
If you want your new text overwrite the old one use just one > character, like this:
type test1 > test2.bat
Good luck, Igor M

Francis: I got a copy of REPL.exe. How does it work?
World Library: No matter how I enter the original text, when I redirect new text to the file, it's on a new line. Please send me the program that will strip of the EOL or CR LF or whatever.
Igor: I need to append to existing text on a line.
Everybody: Thanx Very Much For the Response

Jim A.
The file I mentioned is RPED.exe..
I trust it is on floppy.All you do is type
RPED, the screen text displayed will ask for the filename you want to edit.Enter the filename ..the commands are displayed at the bottom of the display.Scroll to the line you want to edit,use the delete key to remove any type you dont need .then type the text you want to use. Regards .. Francis

Hi,
I am sending the files and a demo bat.
The bat uses dat files instead of adding text to a bat but the concept is the same.....it adds ...as so, www eee rrrr instead of
www
eee
rrr
I have also included three fake zip files (smaller than real ones) as the demo gets the names of zip files and creates a html file......ummmmm ok so I'm lazy...........lol! Yes a bat that writes html.Well I collect.....Hmmmmm unusual? files and have no desire to spend hours updating my site. So I just start a bat and go play on the internet while the update is going on.
Nothing fancy ( The demo)as it is just a snipit I took off the file updater I use for personal use........
Included are a few other files, and if the bat is not self explanatory,,,,,,,I do except bats to "TRY" and work on.
But it does work and I think the reasons for
www
eee
rrr
instaed of www eee rrr will be clear.Peace Goodwill and Happy Computing.
Robin M. Raintree @ World Library

![]() |
![]() |
![]() |

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