Pages

Thursday 13 June 2013

Goto Statement in cmd

Well this is the interesting part  to Fun with cmd part1:
Goto Command redirects the control of execution to other set of statements setting up a "jump of control".

Syntax:
Goto statement
//jumps these codes without executing
:statement
//jumps here executing these codes.


Eg:

@echo off
start notepad
goto a
start cmd
:a
start iexplore
exit
In the above code cmd doesn't open up as the goto statements override the instruction.
I believe it was helpful for you people ..next we are gonna discuss the interesting part It would be about changing foreground and background colors in cmd.

No comments:

Post a Comment