Using the DOS findstr command, how do you search for a string that contains
quotes? Via batch file, Iâ??m trying to search for a string in the lmhosts file
using the findstr command. The string Iâ??m searching for contains quotes which
appear to be affecting the way the findstr command interprets the string.
Here is the command and syntax that Iâ??m using.
Command:
findstr /c:"192.168.1.1 "MP_100 \0x1A" #PRE"
%SystemRoot%\system32\Drivers\etc\lmhosts
Output:
C:\>findstr /c:"192.168.1.1 "MP_100 \0x1A" #PRE" &
SystemRoot\system32
\Drivers\etc\lmhosts
FINDSTR: Cannot open \0x1A #PRE
The system cannot find the path specified.
Any help will be greatly appreciated.
RAW