Solved Search and read from text file

January 31, 2018 at 06:46:34
Specs: Windows 7, 16gb
I wanted to search text from file and get next data from the file.

abc.txt file content lines of data.
{
"sw_version": "v000.000.000",
"path": "\a\b\c",
"date": "21/01/2017"
}

I just want to search "sw_version" and get the data as "v000.000.000"


See More: Search and read from text file

Report •

#1
January 31, 2018 at 06:53:04
✔ Best Answer
try this

::----start of test.bat----
@echo off&for /f "tokens=2 delims=:, " %%a in ('type "abc.txt" ^| findstr "sw_version"') do echo %%a&pause>nul
::----end of test.bat----

i5-6600K[delid]@4.800GHz/4.400GHz cache@1.39v | 2x4GB Crucial-DDR4-2133@14-14-14-28 1T 2800MHz@1.35v
ASUS Z170K
Samsung 250GB SSD 850 EVO
MSI Armor RX 570 4GB@1375c/2087m BiosMod
PSU:VS450


Report •

#2
January 31, 2018 at 07:33:26
What is this about:

i5-6600K[delid]@4.800GHz/4.400GHz cache@1.39v | 2x4GB Crucial-DDR4-2133@14-14-14-28 1T 2800MHz@1.35v
ASUS Z170K
Samsung 250GB SSD 850 EVO
MSI Armor RX 570 4GB@1375c/2087m BiosMod
PSU:VS450

=====================

M2 Get custom script or take private lessons


Report •

#3
January 31, 2018 at 07:39:55
same as this:

=====================

M2 Get custom script or take private lessons

i5-6600K[delid]@4.800GHz/4.400GHz cache@1.39v | 2x4GB Crucial-DDR4-2133@14-14-14-28 1T 2800MHz@1.35v
ASUS Z170K
Samsung 250GB SSD 850 EVO
MSI Armor RX 570 4GB@1375c/2087m BiosMod
PSU:VS450


Report •

Related Solutions

#4
February 1, 2018 at 03:05:46
Thank a lot...!!! It worked

Report •

Ask Question