Return total number of found strings using JREPL
Posted: 09 Aug 2016 07:54
Good Morning D -
I'm using JREPL.bat file and complimenting code to search a set of import files for a specific string.
Here is the code I am using:
It returns the following :
Is there anyway to also return the total number? I have dozens of files and a total amount as well would be extremely beneficial.
Thank you!
I'm using JREPL.bat file and complimenting code to search a set of import files for a specific string.
Here is the code I am using:
Code: Select all
@echo off
setlocal
for %%F in (*.txt) do (
set "file=%%F"
jrepl " 0 " "cnt+=1; false" /l /jmatch /jbeg "cnt=0" /jend "if (cnt) output.WriteLine(lpad(cnt,' ')+env('file'))" /f "%%F">>C:\OUTPUT.txt
)
It returns the following :
4C1.txt
4C2.txt
4C3.txt
Is there anyway to also return the total number? I have dozens of files and a total amount as well would be extremely beneficial.
Thank you!