Stop search when exact match found.
Posted: 20 Aug 2020 08:50
I have a text file with the following...
I search the file with....
Gamepath=I:\Program Files (x86)\EA\Mass Effect 3
when it should be
GamePath=I:\Program Files (x86)\Mass Effect
How to stop search when first exact match found?
Code: Select all
Cities Skylines,I:\Games\Cities Skylines Mass Transit
Mass Effect,I:\Program Files (x86)\Mass Effect
Mass Effect Andromeda,I:\Program Files (x86)\Mass Effect Andromeda
Mass Effect 3,I:\Program Files (x86)\EA\Mass Effect 3
Code: Select all
for /F "Tokens=2 delims=," %%a in ('findstr /C:"Mass Effect" "%SrcPath%\folders.txt"') do set GamePath=%%a
when it should be
GamePath=I:\Program Files (x86)\Mass Effect
How to stop search when first exact match found?