@echo off
setlocal enableextensions enabledelayedexpansion
set /a count=1
set mod=
for %%f in (*.jpg) do (
cmd /c start "" ..\detect\darknet_standard D:\test\files\%%f D:\test\out\%%f
set /a count+=1
set /a mod=count%%4
if !mod! equ 0 ping 127.0.0.1 -n 7 > nul
)
endlocal