Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Split string into variables

Status
Not open for further replies.

Yarka

Technical User
Jan 14, 2007
192
ES
Hi,

Sorry, I am new writing .bat file. I have a file as:

12 52 369

and I need to put this values into variables. For example, I need to have:
a=12
b=52
c=369

How can I do this?

Thanks.
 
Hi,
Yes, I know it, but I don't want it. I have a script that from time to time, it calculates some values and it writes in a file. Then, I need to extract this values for I can calculate more things and it can assign into variables. So, I don't know these values because they are calculates for script. Then, if I have a file with 'x' values separated by a tab, how can I assign this values into different variables?

Thanks a lot.
 
Re-write your script to output as you wish.

If this is not the answer you are looking for then post some code (especially from the script).


--> It's a bird! It's a plane! No, it's an OS update patch! Ahh!! <--
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top