How to Make the BEST Command Prompt (cmd)

188,362

14

24

Introduction: How to Make the BEST Command Prompt (cmd)

About: I've been interested in programming and computer science since age 9!

Hello, everyone!

Today I will show you how to make one of the BEST CMDs ever.

Please rate this Instructable, by the way!

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: Materials

Here's what you need:

     • Computer
     • Text editor (Can be simple, I'm using Notepad for Windows)
     • You
     • Keyboard (Optional, see step 2)
     • Mouse (Optional, see step 2)
     • Hand(s)

If you have most of the above, (must include computer, keyboard/mouse and hand[s]) then you can click Next Step

Step 2: The Code

Ok. Here's the code (copy between the stars) then I will explain:

***********************************************************

@echo off
cls
title Command Prompt - by account3r2
ver
echo (C) Copyright Microsoft Corp.
echo.
:cmd
set /p "cmd=%cd%>"
%cmd%
echo.
goto cmd

********************************************************

Yes, about step 1... You can use the mouse to copy, paste and save the file. Or you can just use the keyboard, using MouseKeys or shift-select then CTRL-C and CTRL-V.

Step 3: The Explanation

@echo off ----- This tells the computer not to display commands unless it is told to do so.

cls ----- This clears any text on the screen.


title Command Prompt - by account3r2 ----- Displays the text after "title" on the title bar.


ver ----- Displays the version of Windows you are running.


echo (C) Copyright Microsoft Corp. ----- Echo displays text, The rest just says the Microsoft has copyright.


echo. ----- Echo with a period after it skips a line, like pressing enter twice does.


:cmd ----- Sets a point to access called "cmd".


set /p "cmd=%cd%>" ----- Makes a line you can type on, then saves what you typed tempararily into "cmd".


%cmd% ----- Does the command you typed.


echo. ----- Still skips a line.


goto cmd ----- Goes to the access point set called "cmd"


Step 4: Saving the File

Now we will save the file.

First, press file. (OR Alt+F)
Next, press Save or Save As... (OR S) (OR Just Press CTRL+S at #1)
Then, Type a name like "whatever.bat" or "CMDPRMPT.bat" but whatever it is put .bat at the end (you can use on screen keyboard for this)
After that, press save.

Step 5: Running the Program

Next you run the program by double clicking it or by selecting it and pressing enter.
It should look like the picture below.

Step 6: Suggestions? Updates?

If anyone has any suggestions or updates for this program, please leave a comment below. Feel free to leave any comments for anything else, and again, please rate this! Thanks!

1 Person Made This Project!

Recommendations

  • Backyard Contest

    Backyard Contest
  • Silly Hats Speed Challenge

    Silly Hats Speed Challenge
  • Arduino Contest 2020

    Arduino Contest 2020

24 Discussions

0
asharma97
asharma97

6 years ago on Step 6

i want to make a cmd application with the following commad:
"arp -d"
and i want to set a time after which it automatically starts at regular interval at background
can you tell me the coding for this

0
malpkapl650
malpkapl650

Reply 9 months ago

Arp is for Linux

0
account3r2
account3r2

Reply 6 years ago on Step 6

Wow it has been years since I wrote this... I sounded so dumb lol... and I'm not quite sure, but knowing batch programming is a good start. Really any programming language is, because it's all the same. For example, Spanish and English are both languages and words mean the same thing, they just look and sound a little different. I'm sure with a little practice, you can make an amazing program. Looking over the years, I've made some pretty cool stuff. In elementary school, I wrote an "operating system" in batch. It was amazing. I made it in 5th grade. In middle school, I hacked my school's server and some teacher computers...using batch. That was fun. I also screwed with the school security system through it. In high school, I did some of the same stuff, not as much though, but still...lol... Unfortunately I can't help you much here at the time, I have to continue with my studies. I may look into it sometime soonm though. Sorry.

0
account3r2
account3r2

Reply 6 years ago on Step 6

Whoops. Should've checked for typos. I meant "soon" and not "soonm"

0
Artgirl200
Artgirl200

10 months ago

Hi there,
Real beginner here, can you tell me how to make a script that just pastes text, so I dont have to write the same thing over and over again? Thanks
www.hackercreations.com

0
lemonie
lemonie

9 years ago on Introduction


There isn't anything like enough in this to be worth posting. Stuff like this is all over the internet anyway - what can you write that's something new / different / clever?

L

0
kodybrown
kodybrown

Reply 5 years ago on Introduction

Using this code enables you to make changes to your prompt that you wouldn't otherwise be able to. For instance:

@echo off

:main

cls

title Command Prompt - by account3r2

echo Command Prompt - by account3r2

ver

echo (c) Microsoft Corporation. All rights reserved.

prompt=$P$G

:cmd

set /p "cmd=%cd:\=/%>"

call %cmd%

goto :cmd

0
unknownvan
unknownvan

Reply 1 year ago

this is literally the most simple program you could possibly make. It's literally just command prompt, which is accessible through the windows search bar.

0
account3r2
account3r2

Reply 9 years ago on Introduction

Like maybe... How to make a program that makes one of the EASIEST to make and the BEST CMDs ever? And I could post the program on this 'Ible?

0
lemonie
lemonie

Reply 9 years ago on Introduction

Well yeah, the site's for stuff we don't know already - sharing stuff we've learned etc.

L

0
PrashantS63
PrashantS63

4 years ago

HOW GET NEAREST IP ADDRESSES

0
unknownvan
unknownvan

Reply 1 year ago

if you are talking about other network connection ip addresses, then you would need to be logged in to the network to find it to begin with. There is no way, with windows command prompt commmands, to trace an ip address you are not/have not connected to.Otherwise

0
ProG11
ProG11

3 years ago

how can i make my OWN commands and only run my OWN commands (not windows commands)?

0
unknownvan
unknownvan

Reply 1 year ago

There isn't a way to do this unless if your commands are based on already existing windows commands. If you want to "make" your own command (based on windows commands programming), you can type the commands you want into notepad, save it as a .bat/.cmd program (named with whatever command name you want), then, using the windows command "call", you can call a cmd file and run that code on it. That way you can kind of "simulate" using your own commands. That's the closest you can get. Example for the call command: "call c.bat". You don't need file locations if the program is in the same file location, otherwise it could be something like "call C:\users\%username%\desktop\c.bat"

1
Mr.C27
Mr.C27

2 years ago

Can you make it so the .bat file runs as administrator I am using school computers and ur the bets its Just I try to change the admin password and it says acess denied error code 5

0
unknownvan
unknownvan

Reply 1 year ago

To run a program with administrator access, you require to be logged into the admin account on the computer. School accounts are "guest" accounts, with no access to changing certain files or running administrator programs. If you're at home, just right click, run as administrator. But you don't need it it it's a home computer. It's just normal command prompt. Go to your windows search bar and type cmd or command prompt. Also, most school computers dont block it.

0
HYBR1Dx2
HYBR1Dx2

3 years ago

so. I try to put " prompt _: " in and it does not work ;-; FICKS ITTTTTTT

0
HYBR1Dx2
HYBR1Dx2

Reply 3 years ago

nvm. Just had to change cmd=(stuff) to cmd=_:

0
PrashantS63
PrashantS63

4 years ago

PLs Tell Me How Get Some One Nearest IP Addresses

0
CmdHtmlProVbs
CmdHtmlProVbs

Reply 4 years ago

If you want a net work ip just do followings:

1. net view (You will see every person on your network)

2. tracert NAME (You'll see the person(s) pc name in net view)

3. Lookup the ip who you traced in your network simple :D