Echo off (Stops displaying c:> before every line of code displayed in the command prompt.)

Example:Stops displaying c:>

Echo off

Echo (Displays a message on the command prompt.)

Example: Displays "Hello world".

Echo Hello world!

Title (Sets the the command prompt title.)

Example: The title is now "Greeting the world".

Title Greeting the world

Cls (Clears all text above and does not display Cls)

Example: Displays "Hello world" then Displays "Bye" With nothing above Bye.)

Echo Hello world
Echo Bye

Pause (Pauses the code until a key on the keyboard is pressed and displays " Press any key to continue...".


Echo Hello world
echo Bye

Color (Sets the color of the text and background. The first digit is the background the second digit is the text.)

Example: 0 is the background A is the text.

Color 0A

Set (Sets a variable.)

Example: "Name" now equals "Bob".

 Set Name=Bob

If (Condition for a variable.)

Example: If the variable "Name" is equal to Bob then it will display "Welcome, Bob" on the command prompt.

If %name%==Bob Echo Welcome, Bob

If not (Condition for a variable.)

Example: If the variable "Name" is NOT equal to Bob then it will display "Your not Bob" on the command prompt.

If not %Name%==Bob echo Your not Bob

Exit (Closes the command prompt)

Example: Closes the command prompt after the pause.

Echo Hello world
Echo Bye

: (A series of code title)

Example: The class is called "Start" and executes all the commands below it.

Echo off
Title Are you Bob?
Color 0A
Set Name=Bob
If %Name%==Bob echo Welcome, Bob
If not %Name%==Bob echo Your not Bob
Echo Bye

Set /a (Sets a variable with a math equation.)

Example: The variable "Number" equals 2.

Set /a Number=1 + 1

Set /p (Asks for user input.)

Example: Displays "What is your name:" and the variable "Name" set to equal whatever you type into the command prompt.)

Set /p Name=What is your name:

Start (Will open a program on your computer or open a Link)

Example 1: Opens up Google Chrome the program.

Start Chrome.exe

Example 2: Opens the link to instructables the web site you are on right NOW.

Start "https://www.instructables.com/"
<p>I'm sorry, I don't see any space.</p>
<p>Do you have more codes</p>
<p>If you mean batch file codes, yes I am working on some new codes. If you mean coding languages, yes I'm learning C#. If you mean Batch commands, temporarily no I don't know any more commands at the time.</p>
<p>can you send me the coding languages</p>
<p>Well, I can send you the coding language links, but <strong>C#</strong> needs a <strong>coding compiler</strong> to run unlike <strong>batch file coding</strong>. The only other languages I know that don't use a <strong>coding compiler</strong> is <strong>VBScripting</strong>. If you want a <strong>command list</strong> on that, I'll work on it.<br><br>This is <strong>C#</strong> : https://en.wikipedia.org/wiki/C_Sharp_(programming_language)</p><p>This is the best <strong>coding compiler</strong> : <a href="https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx" rel="nofollow">https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx</a></p>
<p>thanks a lot man</p>
<p>How can I make a BATCH program solve a math problem with preset formula? </p><p>For Example: You enter 3 and using formula S=3,1*d (*= times, d=the set number, so in this example 3) and you get the result? Please, help urgent... </p>
<p>why this code doesn't work </p><p>set /p name = write site name </p><p>start <a href="http://www.%name%.com" rel="nofollow"> www.%name%.com</a></p>
Remove the space between the name and the = in the first line
<p>Try using <strong>@start</strong> instead of <strong>start</strong>.</p><p><strong>@start</strong> allows there to be <em>%variables%</em> in it. </p>

About This Instructable



Bio: I'm kid that bumped into batch file coding and made lots of effort to learn every thing to make text based games, at least ... More »
More by Mr_ MikaS:Argario server list How to make an Agario server (with command list) Pet wars 
Add instructable to: