【发布时间】:2011-08-05 14:31:29
【问题描述】:
我想计算文本文件中的行数,然后必须将值存储到环境变量中。计算行数的命令是
findstr /R /N "^" file.txt |查找 /C ":"我提到了问题How to store the result of a command expression in a variable using bat scripts? 然后我试了一下,
设置 cmd="findstr /R /N "^" file.txt | find /C ":" "我收到错误消息,
FIND:参数格式不正确我怎样才能摆脱这个错误。
【问题讨论】:
标签: windows batch-file cmd