Reputation: 53
Inside this batch files, exist over 25 lables, each for different purposes..
Specifically the label called ":beep" which make a beep noise in the computer.
I wanted to scheduling the start of this batch file, but only the label "beep", or maybe another batch, but only starting with the label "beep".
I have already used the "call command", which is not what I need.
Is there anybody who knows how to use "Start" command to run a batch file on a specific label?
Example:
start C:\interface.cmd [goto beep]
Upvotes: 2
Views: 1168
Reputation: 53
Maybe i'm just being too lazy...
i will just copy the specific label and its command,
create new batch file..
paste it in there, save it,
and just run the new batch file from Shortcut, Hot Key, task schedule.. which will give me better results.. and just run the commands i needed
more work, but less stress
LOLL.....
Upvotes: 0
Reputation: 1660
OK, so if there are no other parameters, just pass beep as a parameter e.g. batchfile beep
and have a line goto %1
If there are other parameters you need to pass, time to get more creative. Have the start of your bat file, something like:
@echo off
setlocal
set p1=%1
if x%p1:~0,1% equ x: (
shift
goto %p1%
)
Then you can run: batchfile :beep "as many" other "params as you like"
Upvotes: 1