Why is this pipe not working inside a for loop
<p>When I run the code, it outputs <code>FIND: Parameter format not correct</code> and <code>The process tried to write to a nonexistent pipe.</code>. From this, I'm pretty sure the for loop can't handle the pipe and/or redirection. I'm not sure what to do from here, I've tried running it outside a loop, and that works fine, but inside the loop it chucks the dummy. Does anyone know why, or how I can fix this?</p>

<pre><code>@ECHO OFF

setlocal enabledelayedexpansion
for /F "tokens=*" %%a in (set_1.txt) do (
    type set_2.txt | find %%a &gt; nul
    if !errorlevel! EQU 1 (
        echo %%a
    )
) 

endlocal
pause
</code></pre>

<p>And before anyone says it, I'm aware this is not the most efficient method for finding strings in files, but it doesn't matter for the file sizes I'm dealing with.  </p>