output problem

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
tcpman
Posts: 53
Joined: 05 Mar 2014 15:01

output problem

#1 Post by tcpman » 07 Mar 2014 12:40

hi all
this is my code

Code: Select all

echo name=%name% >>data.txt
echo lastname=%lname% >>data.txt
echo grade=%grade% >>data.txt
echo Class=%Class% >>data.txt
echo phone=%phone% >>data.txt

now the output of data.txt is something like this

name=34
lastname=34
grade=34
Class=34
phone=34

i want to be this
name=34 lastname=34 grade=34 Class=34 phone=34

can we do this in batch?

penpen
Expert
Posts: 2009
Joined: 23 Jun 2013 06:15
Location: Germany

Re: output problem

#2 Post by penpen » 07 Mar 2014 14:46

This may help you, although it is nearly the same:

Code: Select all

>>data.txt echo name=%name% lastname=%lname% grade=%grade% Class=%Class% phone=%phone%

penpen

tcpman
Posts: 53
Joined: 05 Mar 2014 15:01

Re: output problem

#3 Post by tcpman » 18 Mar 2014 14:07

tnx
sory for late respone its work :mrgreen:

Post Reply