my batch should call several UP batch files from a main batch file.
I've set up the basic framework, but it doesn't work as it should.
L2 works, but L5,L6 and L7 not. the structure is the same for all of the tests.
I've watched a few videos but haven't found anything that fits my problem.
If L5, L6 and L7 would at least do exactly the same as L2 and I understood the mistake, I would be very grateful if someone explained the mistake I'm making here.
Sorry for this bad English. I Know google translate is not the best.
Main Batch
Code: Select all
@echo off
color 0F
title Interface
rem ******************** M A I N ********************
:MAIN
cls
set stunde=%time:~0,2%
set minute=%time:~3,2%
If "%stunde:~0,1%" == " " set stunde=0%stunde:~1,1%
set dt=%date:~0,2%.%date:~3,2%.%date:~6,4% %stunde%:%minute%
echo %dt%
echo.
echo Abteilung XXX
echo.
echo Linien Aufruf
echo.
echo 2 - Linie 2
echo 5 - Linie 5
echo 6 - Linie 6
echo 7 - Linie 7
echo 0 - Programmende
echo.
set /p Aufruf="Aufruf:"
if %Aufruf% == 2 goto Division2
if %Aufruf% == 5 goto Division5
if %Aufruf% == 6 goto Division6
if %Aufruf% == 7 goto Division7
if %Aufruf% == 0 goto EXIT
goto MAIN
:Division2
call E:\Felix\Unterprogramme\Linie2\Linie2.bat
goto MAIN
:Division5
call E:\Felix\Unterprogramme\Linie5\Linie5.bat
goto MAIN
:Division6
call E:\Felix\Unterprogramme\Linie6\Linie6.bat
goto MAIN
:Division7
call E:\Felix\Unterprogramme\Linie7\Linie7.bat
goto MAIN
L2 (Works all)
Code: Select all
@echo off
color 0F
title Linie 2 Bearbeitung
rem ******************** M A I N ********************
:MAIN
cls
set stunde=%time:~0,2%
set minute=%time:~3,2%
If "%stunde:~0,1%" == " " set stunde=0%stunde:~1,1%
set dt=%date:~0,2%.%date:~3,2%.%date:~6,4% %stunde%:%minute%
echo %dt%
echo.
echo Maschinenauswahl
echo.
echo 11 - OP10/1
echo 12 - OP10/2
echo 13 - OP10/3
echo 14 - OP10/4
echo 15 - OP10/5
echo 16 - OP10/6
echo 21 - OP20/1
echo 22 - OP20/2
echo 0 - zurück
echo.
set /p Aufruf="Aufruf:"
if %Aufruf% == 11 goto OP10/1
if %Aufruf% == 12 goto OP10/2
if %Aufruf% == 13 goto OP10/3
if %Aufruf% == 14 goto OP10/4
if %Aufruf% == 15 goto OP10/5
if %Aufruf% == 16 goto OP10/6
if %Aufruf% == 21 goto OP20/1
if %Aufruf% == 22 goto OP20/2
if %Aufruf% == 0 goto Rücksprung
goto MAIN
:OP10/1
echo Hallo!!!! L2
pause
goto MAIN
:Rücksprung
call "" "E:\Felix\Ae_Group.bat"
Code: Select all
@echo off
color 0F
title Linie 5 Bearbeitung
rem ******************** M A I N ********************
:Main
cls
set stunde=%time:~0,2%
set minute=%time:~3,2%
If "%stunde:~0,1%" == " " set stunde=0%stunde:~1,1%
set dt=%date:~0,2%.%date:~3,2%.%date:~6,4% %stunde%:%minute%
echo %dt%
echo.
echo Maschinenauswahl
echo.
echo 11 - OP10/1
echo 12 - OP10/2
echo 13 - OP10/3
echo 14 - OP10/4
echo 15 - OP10/5
echo 16 - OP10/6
echo 21 - OP20/1
echo 22 - OP20/2
echo 0 - zurück
echo.
set /p Aufruf:="Aufruf:"
if %Aufruf% == 11 goto OP10/1
if %Aufruf% == 12 goto OP10/2
if %Aufruf% == 13 goto OP10/3
if %Aufruf% == 14 goto OP10/4
if %Aufruf% == 15 goto OP10/5
if %Aufruf% == 16 goto OP10/6
if %Aufruf% == 21 goto OP20/1
if %Aufruf% == 22 goto OP20/2
if %Aufruf% == 0 goto Rücksprung
goto MAIN
:OP10/1
echo Hallo!!!! L5
pause
goto MAIN
:Rücksprung
call "" "E:\Felix\Ae_Group.bat"
Code: Select all
@echo off
color 0F
title Linie 6 Bearbeitung
rem ******************** M A I N ********************
:Main
cls
set stunde=%time:~0,2%
set minute=%time:~3,2%
If "%stunde:~0,1%" == " " set stunde=0%stunde:~1,1%
set dt=%date:~0,2%.%date:~3,2%.%date:~6,4% %stunde%:%minute%
echo %dt%
echo.
echo Maschinenauswahl
echo.
echo 1 - Heckert 1
echo 2 - Heckert 2
echo 3 - Heckert 3
echo 4 - Heckert 4
echo 5 - Heckert 5
echo 6 - Heckert 6
echo 7 - Heckert 7
echo 8 - Heckert 8
echo 03 - Makino 3
echo 02 - Makino 4
echo 05 - Makino 5
echo 06 - Makino 6
echo 07 - Makino 7
echo 08 - Makino 8
echo 09 - Makino 9
echo 10 - Makino 10
echo 11 - Makino 11
echo 12 - Makino 12
echo 13 - Makino 13
echo 14 - Makino 14
echo 0 - zurück
echo.
set /p Aufruf:="Aufruf:"
if %Aufruf% == 1 goto Heckert 1
if %Aufruf% == 2 goto Heckert 2
if %Aufruf% == 3 goto Heckert 3
if %Aufruf% == 4 goto Heckert 4
if %Aufruf% == 5 goto Heckert 5
if %Aufruf% == 6 goto Heckert 6
if %Aufruf% == 7 goto Heckert 7
if %Aufruf% == 8 goto Heckert 8
if %Aufruf% == 03 goto Makino 3
if %Aufruf% == 04 goto Makino 4
if %Aufruf% == 05 goto Makino 5
if %Aufruf% == 06 goto Makino 6
if %Aufruf% == 07 goto Makino 7
if %Aufruf% == 08 goto Makino 8
if %Aufruf% == 09 goto Makino 9
if %Aufruf% == 10 goto Makino 10
if %Aufruf% == 11 goto Makino 11
if %Aufruf% == 12 goto Makino 12
if %Aufruf% == 13 goto Makino 13
if %Aufruf% == 14 goto Makino 14
if %Aufruf% == 0 goto Rücksprung
goto MAIN
:OP10/1
echo Hallo!!!! L6
pause
:Rücksprung
call "" "E:\Felix\Ae_Group.bat"
L7 (Not Works)
Code: Select all
@echo off
color 0F
title Linie 7 Bearbeitung
rem ******************** M A I N ********************
:Main
cls
set stunde=%time:~0,2%
set minute=%time:~3,2%
If "%stunde:~0,1%" == " " set stunde=0%stunde:~1,1%
set dt=%date:~0,2%.%date:~3,2%.%date:~6,4% %stunde%:%minute%
echo %dt%
echo.
echo Maschinenauswahl
echo.
echo 11 - OP10/1
echo 12 - OP10/2
echo 13 - OP10/3
echo 14 - OP10/4
echo 15 - OP10/5
echo 16 - OP10/6
echo 21 - OP20/1
echo 22 - OP20/27
echo 0 - zurück
echo.
set /p Aufruf:="Aufruf:"
if %Aufruf% == 11 goto OP10/1
if %Aufruf% == 12 goto OP10/2
if %Aufruf% == 13 goto OP10/3
if %Aufruf% == 14 goto OP10/4
if %Aufruf% == 15 goto OP10/5
if %Aufruf% == 16 goto OP10/6
if %Aufruf% == 21 goto OP20/1
if %Aufruf% == 22 goto OP20/2
if %Aufruf% == 0 goto Rücksprung
goto MAIN
:OP10/1
echo Hallo!!!! L7
pause
:Rücksprung
call "" "E:\Felix\Ae_Group.bat"