This simple example will count how many times a specified string appears in a file. Code: @echo off setlocal set str2find=world set file=%~1 set token=0 for /f "tokens=*" %%- in (%file%) do ( set str=%%-&&call :NEXT ) goto :COUNT :NEXT for /f "tokens=1,*" %%a in ("%str%") do ( set str=%%b set strfind=%%a ) if /i "%strfind%"=="%str2find%" set /a token=%token%+1 if "%str%"=="" goto :eof goto :NEXT :COUNT echo.%str2find% was found %token% times.
You are asking questions about 8085 processors and assembly language and you can't understand what this simple little batch script does. Yes you are trolling me in a very childish manner.