batch file - Need a way to obtain total instances after finding using FINDSTR -


so have far , works finding specified string need echo total number of times it's found.

findstr /c:"\"ma\"" %fn% 

thanks in advance.

findstr has no counter, find has (but has no regex).

also findstr /c: searches \"ma\" literally. should add /r (assuming search "ma"). can combine both commands needs:

findstr /r /c:"\"ma\"" %fn% | find /c /v ""  

Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

c# - two queries in same method -