JavaScript:
@echo off
set name=
set x=0
cd /d "%~dp0"
for /f "delims=" %%? in ('dir /b /s /aa *.exe') do call :Block "%%~?"
echo All EXEs Blocked.
pause
goto :eof
:Block
set /a x+=1
netsh advfirewall firewall delete rule name=all program="%~1"
netsh advfirewall firewall add rule name="Block %name% %x%" dir=out action=block program="%~1" profile=any interfacetype=any
goto :eof