!BAT
errorcheck off
#if exist CALL goto :EOF
echo -n Counting Windows Install ISOs %redir%
insmod /%grub%/CountISOs.g4b > nul
echo -n %redir%
# get filecount of WINDOWS ISOs for next WINDOWS menu
set CXP=0
set CV=0
set C7=0
set C8=0
set C28=0
set C12=0
set C10=0
set C16=0
set CALL=0
CountISOs.g4b /_ISO/WINDOWS/XP .iso
set /a CXP=%FCOUNT% && echo -n [XP(%FCOUNT%) %redir%
CountISOs.g4b /_ISO/WINDOWS/VISTA .iso 
set /a CV=%FCOUNT% && echo -n WV(%FCOUNT%) %redir%
CountISOs.g4b /_ISO/WINDOWS/WIN7 .iso 
set C7=%FCOUNT% && echo -n W7(%FCOUNT%) %redir%
CountISOs.g4b /_ISO/WINDOWS/WIN8 .iso 
set C8=%FCOUNT% && echo -n W8(%FCOUNT%) %redir%
CountISOs.g4b /_ISO/WINDOWS/SVR2K8R2 .iso 
set C28=%FCOUNT% && echo -n W2K8(%FCOUNT%) %redir%
CountISOs.g4b /_ISO/WINDOWS/SVR2012 .iso 
set C12=%FCOUNT% && echo -n W2012(%FCOUNT%) %redir%
CountISOs.g4b /_ISO/WINDOWS/WIN10 .iso 
set C10=%FCOUNT% && echo -n W10(%FCOUNT%) %redir%
CountISOs.g4b /_ISO/WINDOWS/SVR2016 .iso 
set C16=%FCOUNT% && echo -n W16(%FCOUNT%)] %redir%
set /a CALL=%CXP%+%CV%+%C7%+%C8%+%C28%+%C12%+%C10%+%C16% > nul
# clear variables set by CountISOs.g4b
set FCOUNT=
set FILEPATH=
set FILENAME=
set FILEEXT=
set FILEDIR=
delmod CountISOs.g4b > nul
