@echo off
set str="382 -VB814266"
set file="110715*.txt"
type %file% 2>nul | findstr /c:%str% >sum.txt
for /f %%a in (' "type %file% 2>nul | find /c %str%" ') do set n=%%a
echo %n%
pause
:echo off
u:
cd MTN\OPSDATA_BKUP
set str="382 -v143788"
set file="200718*.txt"
type %file% 2>nul | findstr /i /c:%str% >sum.txt
for /f %%a in (' "type %file% 2>nul | find /i /c %str%" ') do set n=%%a
echo %n%
pause