diff --git a/06_Copy2Stick.cmd b/06_Copy2Stick.cmd index 2d2dd65..b413cbe 100644 --- a/06_Copy2Stick.cmd +++ b/06_Copy2Stick.cmd @@ -76,22 +76,22 @@ tools\searchreplace %USBDRIVE%\autounattend.xml ___MYNAME___ "%MYNAME%" tools\searchreplace %USBDRIVE%\autounattend.xml ___MYPASS___ "%MYPASS%" tools\searchreplace %USBDRIVE%\autounattend.xml ___MYLANG___ "%LANG%" -echo. -echo copying [ %BOOT% ] to drive %USBDRIVE% ... -robocopy %SOURCES% %USBDRIVE%\sources %BOOT% /J /NJH +if EXIST %SOURCES%\%BOOT% ( + echo. + echo copying [ %BOOT% ] to drive %USBDRIVE% ... + robocopy %SOURCES% %USBDRIVE%\sources %BOOT% /J /NJH +) else ( + echo DOH! no %BOOT% in [ %SOURCES% ] found + exit /b +) if EXIST %SOURCES%\%IMAGE% ( - echo. echo copying [ %IMAGE% ] to drive %USBDRIVE% ... robocopy %SOURCES% %USBDRIVE%\sources %IMAGE% /J /NJH - ) else ( - - rem echo. echo DOH! no %IMAGE% in [ %SOURCES% ] found exit /b - ) :CONT