Goto Command In Windows Server 2008
This article explains Goto command in Windows Server 2008 operating system.
Goto command applies to all versions of Windows. Goto command is used to transfer control from one part of a batch file to another. Cmd directs cmd.exe to a labeled line in a batch program. Goto directs command processing to a line that is identified by a label. Label is used to define the transfer point in the batch file. Basic syntax for using Goto command is given below.
In above syntax
||Specifies text string used in batch program as a label.
Formats a disk in drive A as a system disk. If no error occured, the goto command directs processing to the :end label.
format a: /s
if not errorlevel 1 goto end
echo Error occurred .
echo End of batch program.
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here