468,544 Members | 1,809 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,544 developers. It's quick & easy.

Batch (BAT) scripting to append to file without new line

5
Hi

I would like to create a batch file (bat) where it outputs some text (either by echo or calling some other script) and append to an existing text file. However, everytime a > (or >>) is used, it automatically adds a new line afterwards. How can this be avoided please?

For example,

echo a > text.txt
echo b > text.txt
echo c > text.txt
"....... calling some other java script..... " > text.txt
echo d > text.txt
echo e > text.txt

This would make the text.txt file look like something like this:

a
b
c
hello
d
e

My goal is to make the content of text.txt to look like this:

abchellode

Can you please help?...

Many thanks!
Oct 2 '08 #1
1 6484
jg007
283 100+
I do quite a lot of batch files but I am not sure how to do that , if you are using vbscriot anyway can you not use that to add the text?
Oct 2 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

12 posts views Thread by Moosebumps | last post: by
reply views Thread by SkySea | last post: by
5 posts views Thread by Bob Darlington | last post: by
6 posts views Thread by Charles Neitzel | last post: by
3 posts views Thread by emman_54 | last post: by
14 posts views Thread by =?Utf-8?B?R2lkaQ==?= | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by UniDue | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.