@echo off
rem === 16-oct-2022 UPKR-packet

rem ---SETUP-BEGIN-------------------------------------------------------------------
rem === filename mask for subdir/scanning
SET MASK=*.C
rem === scanning directory (current default)
SET SCANDIR=%CD%

rem ---SETUP-END-------------------------------------------------------------------

for /f "tokens=1 delims=	^" %%F in ('dir /s /b "%SCANDIR%\%MASK%"') do call :procf "%%F"
goto end

:procf
SET FNAME=%~1
if "S%FNAME%"=="S" goto end
if exist "%FNAME%.upk" del /q "%FNAME%.upk"
echo "%FNAME%"
upkr.exe -l 9 --z80 "%FNAME%"

goto end

:end
