Currently trying to loop trough an array of strings while searching for specific string in a file. Not getting the output that I would like.
@echo off
wmic qfe get HotfixID > WinUpdateList.txt && set file=WinUpdateList.txt
set patch[0]=KB4012212
set patch[1]=KB4014985
set patch[2]=KB4014573
set patch[3]=KB4015546
set patch[4]=KB4018271
set patch[5]=KB4019263
set patch[6]=KB4019264
for /L %%a in (0,1,6) do (
>nul find /C "%patch[%%a]%" %file% && (
echo %patch[%%a]% was found.
) || (
echo %patch[%%a]% was NOT found.
)
)