Introduction: Batch Tutorial - Remake

Picture of Batch Tutorial - Remake

Alright, this is a total remodel of my first tutorial, as it did not turn out good. I hope this one comes out better, please give me feedback, as I like to hear from you all. Thank! :D

OK, so lets begin:
Some common questions for beginners would be "Is it hard"? Well, I can say, no batch coding is not hard at all, once you get the hang of it.  Some basic commands you will need to know for batch coding are these:

@echo off - Always put this at the top of your file, to hide the echo. (Explain later)
echo - This is what you put for text, like "echo Hi!" would produce "Hi!" on the screen if you have echo off
set  /p {variable name} - This sets a variable that you can call on later, as I will show soon.

These are the basic commands you will use for your first batch file, your probably getting anxious to start, so let's begin.
First off, on your desktop create a new folder named 'Batch", now inside of the create a new text file. Inside that text file, and the top put @echo off. Skip a line then under that put whatever you like, after "echo". I am going to put "echo Hello, what is your name", for demonstration purposes. Under that,  put  set /p name=. This will make the user type their name, and set it as the variable name. Then we call it on, type "echo Hello, %name%, the %'s call a variable out. Now lets make it not shut down, type "pause", this will display "Press any key to continue..." after the message, and then shut down when you press a key. Now let's save! Click File > Save As > and name it Test.bat. NOTE: Some people think you need to change the Save Type to all files, but this is not true. As long as you have the .bat it should work. Now start up your file and see what it does!


Step 1: Commands:

Picture of Commands:

Here are some more commands that you can test out. I encourage you to try and experiment!

pause - Enters "Press any key to continue..." and then goes onto the next section/closes
title - This will change the title at the corner of the screen

I hope guy guys enjoyed this tutorial!

Comments

Computer Ninja54 (author)2013-08-20

Feedback is enjoyed! Comment if it helped!

About This Instructable

579views

1favorite

License:

Bio: 'Ello. Just a simple batch coder and minecrafter. ;)
More by Computer Ninja54:Batch Tutorial - RemakeHack your WiiBatch File Tutorial 1
Add instructable to: