@echo off
set SOURCES=c:\TEMP\W10\sources

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

rem check for wim file ...
if NOT EXIST %SOURCES%\boot.wim (
  echo ERROR: [ %SOURCES%\boot.wim ] NOT FOUND!
  cd ..
  exit /b
)

echo =========================================
echo START of BOOT image creation process ... 
echo =========================================
echo.

rem start scripts
for %%S in (

  mount-boot.cmd
  finish-boot.cmd

) do (

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

)

rem go back ...
cd ..

echo.
echo ======
echo READY.
echo ======