I want to keep the output of the following command to a variable.
corflags ICEConnectDT.dll | findstr "PE"
When I tried the following statement, it shows the error “| was unexpected at this time.”
for /F "delims=" %%a in ('corflags ICEConnectDT.dll | findstr PE') do echo %%a
How can I solve the issue?
Escape the pipe
Or enclose the entire command string in double quotes (inside the single quotes)