how to read info (strings) from txt file output variable

August 29, 2017 at 12:43:05
Specs: Windows 7
I have a question:
1) to read from txt file to extract some info as variable, output as either txt file or variable.bat so it can be used by the other batch files for processing

2) currently I only found from internet, we can get a entire line containing that wanted string or info. After that we need trim off unwanted part in that line and get the only string wanted as variable...
but usually the wanted string is a variable, meaning changed between versions or between components...
So how we can do the job efficiently or automatically
BTW, we can define the txt format favor to the reading string..
here is the example:
1) component: 1
file to sign: ---1111.file
folder: app\abc
signed file: 0101.file
scheme pack: T501-12345-0101

2) component: 2
file to sign: ---2222.file
folder: app\efg
signed file: 0202.file
scheme pack: T501-67891-0102
..........................

Basically what I try to do is to read each component as comp1 and comp2....
to get the value after : -->variable
for example component 1
set comp_var1=1111.file
set comp_var2=abc
set comp_var3=0101.file
set comp_var4=T501-67891-0101

Now how I can efficiently to get these info from txt file...

any thoughts? appreciated for your help...

Thanks

message edited by goodywp


See More: how to read info (strings) from txt file output variable

Reply ↓  Report •
Related Solutions


Ask Question