Start other Batch to :start (Springpoint (?))

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
(_osd_)
Posts: 25
Joined: 01 Mar 2015 07:41

Start other Batch to :start (Springpoint (?))

#1 Post by (_osd_) » 01 Mar 2015 07:46

Hi guys :mrgreen:
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! :wink:

Squashman
Expert
Posts: 4488
Joined: 23 Dec 2011 13:59

Re: Start other Batch to :start (Springpoint (?))

#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

Post Reply