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...


message edited by goodywp

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

Report •

December 13, 2017 at 05:49:32
You should re-ask your question under software --> programming.
that way youll get responses within a few hours

i5-6600K@4.650GHz/4.448GHz cache@1.315v | 2x4GB Crucial-DDR4-2133@ 14-14-14-28 1T 2729MHz@1.3v | ASUS Z170-K | Samsung 250GB SSD 850 EVO | MSI RX 570 ARMOR 4GB@1295cc@1.058v&2050mem | Corsair VS450

Report •
Related Solutions

Ask Question