批量查找命令不起作用

时间:2013-10-28 18:38:21

标签: batch-file find findstr

有谁知道为什么这不起作用(Windows 7,批处理脚本)?

C:\testing>FINDSTR /R /N "^.*$" test.txt | FIND /C ":"

FIND: `/C': No such file or directory
FIND: `:': No such file or directory

1 个答案:

答案 0 :(得分:9)

尝试:

FINDSTR /R /N "^.*$" test.txt | %windir%\system32\FIND.exe /C ":"

与此同时:

for %f in (find.exe) do @echo %~dpfnx$PATH:f

(批处理文件的双%)您可以看到将执行哪个FIND.EXE