批量查找命令不起作用

Fra*_*tal 6 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
Run Code Online (Sandbox Code Playgroud)

npo*_*aka 9

尝试:

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

与此同时:

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

(%批处理文件的两倍)你可以看到FIND.EXE将要执行的文件.

  • 好吧...我安装了cygwin,因此unix find命令必须干扰批处理命令,如npocmaka和cookie所述.非常感谢帮忙. (3认同)
  • 我有同样的问题.`C:\ Program Files(x86)\ Git\bin\find.exe`已执行!谢谢. (2认同)