E:\DOS>set abc=abc E:\123 1111
E:\DOS>echo %abc%|findstr "E"
abc E:\123 1111
E:\DOS>echo %abc%|findstr "E:"
abc E:\123 1111
E:\DOS>echo %abc%|findstr "E:\"
E:\DOS>
Why can't E:\ be found???
[ Last edited by xycoordinate on 2007-3-14 at 09:29 PM ]
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
E:\DOS>set abc=abc E:\123 1111
E:\DOS>echo %abc%|findstr "E"
abc E:\123 1111
E:\DOS>echo %abc%|findstr "E:"
abc E:\123 1111
E:\DOS>echo %abc%|findstr "E:\"
E:\DOS>
@echo off
set abc=abc E:\123 1111
echo %abc%|findstr "E\\"
pauseOriginally posted by ccwan at 2007-3-14 17:54:
Try this
@echo off
set abc=abc E:\123 1111
echo %abc%|findstr "E:\\
pause
Thank you, ccwan!
Under your reminder, I looked at
findstr /?
Found:
\x Escape: literal usage of metacharacter x
[ Last edited by xycoordinate on 2009-7-7 at 05:28 ]
@echo off
set abc=abc def
echo %abc%|findstr /c:" "
pause@echo off
set abc=abc def
echo %abc%|findstr /c:" "
pauseOriginally posted by ccwan at 2007-3-20 13:29:
It should be like this
@echo off
set abc=abc def
echo %abc%|findstr /c:" "
pause