!BAT
# Usage: CountISOs.g4b /MYDIR
# Action: Counts the number of files ending in .iso in the MYDIR folder

if "%1"=="" pause NO PARAMETER! && exit
ls %1/ > (md)0x300+10
cat --locatei=.iso\x20 (md)0x300+10 > nul
set /a FCOUNT=%@retval%  > nul
cat --locatei=.iso\x00 (md)0x300+10  > nul
set /a FCOUNT=%@retval%+%FCOUNT%  > nul

cat --locatei=.imgptn  (md)0x300+10 > nul
set /a FCOUNT=%FCOUNT%+%@retval%  > nul
