Basic Batch




In this Instructable I will show you the basics of CMD and batch files, below is a picture of my cmd window.

This is my first instructable!!!

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Starting CMD

To Start CMD go Start>Run and Type CMD, or Start>All Programs>Accesories>CMD/Command Prompt but if you still can't find it download the file below, then start it.

To Download a File Right Click and Select Save Target and save it as Whatever.bat

Step 2: Batch

Batch is a CMD but written in notepad
this means that instead of going to CMD you can also go to notepad
start>All Programs>Accersories>Notepad or download my file below.
after notepad is open you can write all the commands into notepad and save it as Whatever.bat remember change the drop down menu text documents to all files like shown below.

Step 3: Basic Commands

 Here I will tell you some of the basic  CMD commands,

echo - This is a way you can insert text into the cmd window.
pause - This pauses CMD (This should be used after echo to keep the text on the screen).
exit - This exits the CMD window.
start - You Can start programs with this (You can put just the name in here if its in the windows folder otherwise you need a directory).
del - Deletes files (You May Need a Directory for this).
copy - Copies files (You Need 2 Directory's for this the starting 1 and the directory you want the file to end up ).
Move - Moves Files  (You Need 2 Directory's for this the starting 1 and the directory you want the file to end up ).
%random% - Random Numbers (To See Numbers put %random% after echo)


Step 4: Shutdown Command

This will Show you how to use shutdown command or you can download my shutdown batch file.
shutdown - Gives the computer the command to either logoff, shutdown,
restart or abort a shutdown 
shutdown -s


shutdown -r 


shutdown -l


timers can also be added
shutdown -s -t 60
shutdown in 60 seconds

shutdown -r  -t 360
restarts in 6 minutes 
The timer dosen't work for logoff.

To add a comment put -c "Comment Here" on the end

Shutdown -s -t 506 -c "By By"

Step 5: A Quick Program

I have put together a batch file that contains some of the stuff mention in this Instructable
Please Download it.

The Password is cow

However there is a bigger version of the file on another instructable I wrote.
The Instructable is called The Interface.

Step 6: .Bat to .Exe Coverter

.Bat to .Exe Coverters are good way to keep people from editing the file, finding out the password you put in the file and also to add icons, extra files etc.
I use the one below bat to exe converter (Original Name) its very good as you can see below

Be the First to Share


    • Instrument Contest

      Instrument Contest
    • Make it Glow Contest

      Make it Glow Contest
    • STEM Contest

      STEM Contest

    11 Discussions

    this is a very nice instructable, continue working on the interface file, if you need some inspiration visit Tatcreator's instructable, TAT subsystem, and also view my instructable, The Megafile, and again very nice instructable.

    2 replies
    vorlockPsychic Master

    Reply 9 years ago on Introduction

    Thank you,
    This was my first Instructable and I chose something simple to start off with. At the moment I am making another Instructable about Batch Pranks which involves non-stop frezzing and the computer shutting down at startup. (Not Yet Published) 
    What happened to step 3 on your instructable, and I cut the file on the end in half because the first bit is confusing and i wanted to make it bigger before I showed someone the whole piece.


    9 years ago on Introduction

    There are so many basic DOS / .bat Instructables and a vast amount of stuff elsewhere on the internet that it would be worth showing something new / different / unique or novel. It doesn't have to be super-complex, but of some real use and not seen before.
    You appear to have used the same image 5 times, it would be better to take screenshots of the actual code you're referring to in the steps.


    5 replies

    Reply 9 years ago on Introduction

    Thanks for the tip, but i had the same picture 5 times because i kept on getting big grey squares on the screen. But i will change the pictures.


    Reply 9 years ago on Introduction

    Yes, I think it may be a file-format thing, but if it isn't post a Forum topic in Help: Bugs



    Reply 9 years ago on Introduction

    Ah yes. But the password in the .bat is "Thomas" not "Cows", isn't it?



    Reply 9 years ago on Introduction

    It was Thomas but i forgot to update the file so now it is not thomas or cows but cow.

    (just updated file)

    Could you please take a look at Batch Pranks for me

    i have no addons yet to add to the end of step 3 so i just left it blank for the tmie being and am waiting for some kind of app to add to it..., also would it be possible for me to see all of your file as one piece? 

    1 reply