I read each line in the file1.txt file and parse it against the = character. The problem is that the extracted word has a space at the end and findstr doesn't find the searched word in file2.txt because of this. I tried to use: set g=%g: =% to remove the space, but it doesn't work. Can someone help me please?
for /f "tokens=*" %%a in (file1.txt) do (
for /f "tokens=1,2 delims==" %%g in ("%%a") do (
if [%%h] == [] (
echo %%g
) else (
FOR /F "tokens=*" %%i IN ('findstr /c:"%%g" file2.txt') do (echo %%i)
)
)
)