I have a script that saves 2 files in a backup folder. I want to get a message box if the copy command was successful or not.
@echo off
Echo msgbox"Saving test1 to \backup directory." + vbNewLine + "Successfull!",0,"Backup file..">test1.vbs
Echo msgbox"Saving test2 to \backup directory." + vbNewLine + "Successfull!",0,"Backup file..">test2.vbs
copy test1.txt backup\test1.txt
if %ERRORLEVEL% == 0 (
start test1.vbs
goto test2
)else (
echo ## Errorausgabe: %ERRORLEVEL%
echo.
)
:test2
copy test2.txt backup\test2.txt
if %ERRORLEVEL% == 0(
start test2.vbs
goto commonexit
)else(
echo ## Errorausgabe: %ERRORLEVEL%
)
:commonexit
pause
It works till i get the message box from test1. But when I click submit the test2 doesnt start. What's the problem here?