Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
(_osd_)
- Posts: 25
- Joined: 01 Mar 2015 07:41
#1
Post
by (_osd_) » 01 Mar 2015 07:46
Hi guys
I have a problem:
I have a batch which has to start another batch to the point :start .
example:
Batch1:
Code: Select all
@echo off
start batch2.bat [to :start]
exit
Batch2:
Code: Select all
@echo off
echo You´re wrong here.
:start
echo Welcome.
pause
Do you have an idea how to accomplish that? Maybe with start parameters or call... but I have no idea.
-Thanks for answers!

-
Squashman
- Expert
- Posts: 4488
- Joined: 23 Dec 2011 13:59
#2
Post
by Squashman » 01 Mar 2015 21:19
We just covered this topic the other day.
Code: Select all
@echo off
start batch2.bat "GOTO START"
exit
Batch2:
Code: Select all
@echo off
%~1
echo You´re wrong here.
:start
echo Welcome.
pause