@echo off

rem check for wim script directory ...
if NOT EXIST wim (
  echo ERROR: script directory [ wim ] NOT FOUND!
  echo ABORT.
  exit /b
) else (
  cd wim
)

clear
echo =========================================
echo END of MAIN image preparation ... 
echo =========================================
date /t
time /t
echo.

rem start scripts
for %%S in (

  mount-image.cmd
  remove-apps.cmd
  finish-image.cmd

) do (

  echo ########## calling [ %%S ] ##########
  call %%S
  echo.

)

rem go back ...
cd ..

echo.
date /t
time /t
echo ======
echo READY.
echo ======