I'm trying to set a varaible to the output of a command using a for loop, as another question on here discussed, but I'm getting stuck on some special characters that are screwing with the result. Here's what I've written:
for /f "delims=" %%i in ('netstat -b ^| find ""coresrvr.exe"" ^| find /c /v """"') do set output=%%i
That doesn't seem to be working though. It gives me "File not found - CORESRVR.EXE and then has the output = 0. What did I do wrong here?