I apologize for the vagueness of my question.
I wanted to be able to take information and stack it in a file, the pull the information from the file in line.
The way that I am able to do this at this time is with:
:: simple setting of variables
Set var1=var..
Set var2=var..
Set var3=var..
Set fullvar=%var1%%var2%%var3%
:: now push to file
Echo fullvar > file
Before I asked my question I did not realize I could stack my variables in this way.
I am going back through batch tutorials.
Can this question be closed?
Thank you for you assistance.
Original transcript below
I am looking for a way to put my variables into a file in line. With >> I can append a new line, I want to have my var% in line...
Ex:
Type file2
returns %var1% %var2% %var3%
Instead of;
%var1%
%var2%
%var3%
:eof
I want to be able to use them as %1 %2 %3 in my batch program.
Here is the basic information I am using.
Echo off
cls
ping /n 1 ipaddress1Var > file
ping /n 1 ipaddress2Var >> file
findstr /i "ttl=" file > file2
Type file2
pause
:eof
this returns the line included with ttl= to the new file. I am not sure how to write what I want this to do;
When I > or >> to file2 I want to add to the line that it is written to instead of a new line.
Unfortunatly I do not have my computer I wrote the batch file on with me. I want to expand the capabilities of the script.
I am learning more intermediate batch programming on a WinXP laptop.
Any help or pointing in the right direction would help. This does not google well.
Cheers
Maybe
Echo %var1% %var2% %var3% > file#
Would work for building the file in line. I am just not sure how to read and re-assign the variables properly....