User Login

Help Community Login:

The Windows Command Window - What Is It? How Do I Get To It? And How Do I Use it?

4 replies [Last post]
GeekDrop's picture
The Drop!
Co-Admin. Cuz Even God Rested On The 7th DayModerator (Watching Over The Masses)Joined the Dark SidePremium Member (Gold)I'm a Code Monkey!The Steel CurtainComputer Dr. (Let's clean up that messy Virus!)I use FirefoxI use Google ChromeI use Internet ExplorerI use SafariI'm Here To Help, & Have Proven It!Linux UserWindows UserI donated more than $20+ to GeekDrop!I donated to GeekDrop simply because I love it!I spend all day Photobucketing!Booga Booga BoogaI took a bite of the AppleI'm MagicThe Dr. left the stem off the apple!The JokerSomeone thinks you're a cutlet above the rest!
Relationship Status:
Joined: 01/20/2009
Posts: 379
Drops: 1136
Mood: Smart

The Windows Command Window - What Is It? How Do I Get To It? And How Do I Use it?

Ahh yes, the Windows "Command Window" ... You're already scared ... I can feel it through your shaky fingers resting on the keyboard ...

I know ... it's kind of ugly ... no purty icons to click on, just a black screen, white text and you have to type everything by hand, usually with cryptic "commands". Have no fear ... GeekDrop's here ... or something along those lines ...

We'll tell you exactly what the Command Window is, and show you from a complete beginner's perspective how to use it for basic needs. This is by no means intended to be an exhaustive tutorial, or will even go into great depth about it's technical stuff, in fact I'm only going to touch on some of the most used, and required things to know, so that you can jump right in when needed (or wanted) with complete confidence.

What is the "Command Window"? (sometimes called the "Command Prompt")

Well, you can think of it as sort of a second OS (Operating System) to go along with the pretty GUI (Graphical User Interface) that you normally use, named "Windows". It used to be the underlying OS that the Windows OS ran "on top" of, until Windows ME (WinME). The OS was called "DOS" (Disk Operating System), and the Command Window as it's now called was actually called a "DOS Window", "DOS Box" or more often a "DOS Prompt".

All versions of Windows after WinME have a sort of "virtual DOS mode" now, rather than true DOS, and use many of the same old DOS commands, so unless you knew any better, it still actually feels as if you're using good old DOS itself. DOS was only a 16-bit OS, so with 32-bit and 64-bit computer these days, it for the most part, has been outgrown as newer versions of Windows and more powerful computers were born. However, to this day doing things via the "command-line" (yet another name for the Command Window) can very often be extremely useful, powerful, and fast, and you can even write "Batch" files or scripts to automate things for you. We'll cover Batch (.bat) files some other time. Suffice it to say, once you know your way around a Command Window, you're gonna be ahead of the game, and will probably impress the hell out of your friends, even having only basic command-line skills.

GeekDrop Fun Fact Command Window DOS Prompt In this beginner's tutorial, I'll be using all of the names for the Command Window that I've mentioned interchangably, not to confuse you, but so that you can start getting used to it since it happens all over the net that way. Wink

"Sounds awesome, so how do I get to it?"

There are 2 standard ways to open a Windows Command Window ...

Getting to your Command Window (Method 1):
Go to your Windows Start Menu and click the "Run" button. (A nice keyboard shortcut is to press the Windows Key + "R"). Fig-1

windows command prompt
Whether you clicked on "run" from the Start Menu or used the keyboard shortcut, you'll get the following screen next. Type in "cmd", and then either press the "Enter" key or click the "OK" button, as shown in Fig-2.
tutorial DOS prompt command line
Getting to your Command Window (Method 2):
This is usually an easier and preferable way to open a Command Window because wherever you open it, it'll automatically place you "in" that folder. Right-clicking on any folder in Windows Explorer (or other file managers such as PowerDesk for example), you'll see the "Open command window here" menu item. Click it. Fig-3

If you open a Command Prompt using this method on a network share, Windows will automatically create a mapped drive and then remove it once the Prompt is closed. Sweet eh?

GeekDrop Fun Fact Command Window DOS Prompt In Windows Vista, and Windows 7, it's already a part of the Operating System, but in Vista you will need to hold down the Shift button while right-clicking on the folder to make it show in the context menu.

If you'd prefer to have the options show whether the shift key is pressed or not, then follow these steps.

Note: Since this is a small Registry hack, be sure to make a backup of the registry key before making the change so that you can replace it if wanted/needed.

  • Click the Start button, Run and then type: Regedit
  • Go to the following registry key:


  • Within the right pane, highlight the REG_SZ value named: Extended, and press the delete button, or right-click and click delete in the context menu.
  • Exit Regedit

The Open Command Window Here option will now always appear whenever you right-click on a folder.

In versions of Windows older than Vista, you'll need to install one of the "Microsoft Powertoys". Click here to grab the "Open Command Window Here" file and install it.

dos prompt commandline

Regardless which of the methods above that you chose to use, they'll all take you to a Command Window that looks similar to the one shown below ... Fig-4

command window prompt newbies tutorial how to

Note: Upon first opening the Command Window, you'll see some standard Microsoft Windows name and version info at the top. I have already done some work in mine so I have cleared the screen, which I'll show you how to do in a bit.

Congrats! You've opened your first(?) Command Prompt. No so bad, right? You're probably asking yourself why my text is green and yours is white, huh? Well, see the little icon on the title bar at the top left of the window? If you left-click it, you can click the "Properties" menu item and there are tabs where you can customize all kinds of stuff for it. The tab on the far right that says "Colors" will let you change your text and background colors. I like mine to have that old school "Wargames" look to it, so I made it black and green.

"Sweet! Now how do I use it?"

Childs play really! The only thing you really need to worry about is that you're not a keyboard hen-pecker! Because there's alot of typing involved when using the Command line. So warm up both of those hands, crack all of those knuckles, find Home Row, and let's get cookin'.

Using the Command Line basically just involves memorizing a few basic "commands" (that's why they call it the "command line" after all), it best to try and remember what each command is short for, that way if you can't remember the actual command, just thinking what you want to do right then, will refresh your memory, since the commands are usually common sense phrases. For example, if you're staring at the screen wanting to change directories, if you remember that "CD" is short for "Change Directory", walah! You just remembered the command is "CD".

The most used commands are:

Don't use quotes. There's only one exception which i'll explain later.

One thing to remember about Command Windows is if you're not already "in" the same folder as the command you plan to use on the folder/files, you'll need to type out the full path to the folder or file.

After typing out the full command including any paths or switches, press the "enter" key.

Command Short For What It Does
"dir" "Directory"

Displays all of the folders and / or files in the folder that you're currently in.

If you want (it's optional), you can add "switches" (sometimes called "flags" or "parameters") to the dir command to do more stuff. Switches usually are just a letter, or a word preceeded by a dash (-) or forward slash (/).

If you do a "dir /w" ("w" stands for "wide") you'll get a listing of all files / folders without the detailed information, such as the date of each file, etc.

If you do a "dir /p" ("p" stands for "pause") you'll get a listing of all files / folders as usual, however, normally if there's too many of them to show on the screen at one time, they'll all just flash before your eyes, and you won't be able to see everything. Adding the "p" switch will only show you as much as can be seen on one screen's worth, then you can press the spacebar to get the next screenful. To bail out of more pausings just press the "esc" button to get back to your trusty command prompt.

With most commands, you can use switches together for multiple effects if desired. For example, doing a "dir /w /p" will show the less detailed, wide version and if there're still too many to fit on the screen at once, you'll get the pause as well. Slick, eh?

"cd" "Change Directory"

Just as the "Short For" implies, you use this little doozy to navigate to your different folders. It's the typed-out version of using Windows Explorer and just clicking on individual folders.

You would normally use this in combination with the "dir" command as shown above. Some examples on it's usage would be:

"cd c:\downloads" or even just "cd downloads" if on the same drive and the "downloads" folder is below where you currently are. Remember, even though it's not graphical, it still works like a "tree", just like regular Windows Explorer does", so there's a folder hierarchy. If you type it wrong, you may just get an error message saying "the system cannot find the path specified".

Which brings us to the next command ...

"cd .." "Change Directory, up 1 level" Adding a space and then 2 dots after the cd command will take you up one folder level. i.e. if we're in "C:\Windows\Stuff" and type "cd .." we'll end up in "C:\windows". Pretty self explanitory.
"cd /" "Change Directory, all the way to the top level" This is a really handy command. No matter how many levels deep you may be in the folder tree, instead of doing a bunch of "cd .."'s until you're at the very top again, just do a "cd /" (that's cd, space, forward slash) and pop! You're all the way at the top again. So for example, if you're at "C:\program files\adobe\geekdrop rules\directorya\directoryb\directoyc\directoryd\etc" using this command you'll suddenly be at "C:\". The "root" folder.
"cls" "Clear Screen" Typing cls will erase all text on the screen leaving you at the blinking prompt
"exit" "Exit" Type exit at the prompt and the Command Window will close completely.
"ren" "Rename" If you want to rename a file or folder, use this command followed by the original name, then the name to change to. i.e.: ren oldfilename.exe newfilename.exe
"copy" "Copy"

If you want to copy a file or folder, use this command followed by the original path/name, then the path/name to copy to. i.e.: copy c:\filename.exe c:\downloads\filename.exe

You can also rename the file as it's being moved. Just choose the new file name in the second parameter. i.e.: copy c:\filename.exe c:\downloads\renamed.exe

Don't forget your quotes if using long file names!

"move" "Move"

If you want to move a file or folder from one place to another leaving no copy behind, use this command followed by the original name, then the name to move to. i.e.: move c:\filename.exe c:\downloads\filename.exe

Don't forget your quotes if using long file names!

"del" "Delete" To delete a file simply type "del <filename>". i.e. del file.exe
"/?" "Help"

Almost, if not all commands in a Command Window have built-in help, explaining how to use the command including any extra switches and what they all do. To see them simply type " /?" after the command.

i.e. copy /?

Sometimes the word "help" can or will be used instead of the question mark. If one don't work just try the other.

F3 Button - This isn't really a Command, but rather a very handy shortcut. Pressing the F3 button at a blank command prompt will automatically enter the last thing you typed. Very useful for those super long paths you just typed, but didn't work quite right, so you need to edit just a chatacter or two, amongst many other uses. Try it!
Up Arrow - This is very similar to the F3 method above, however, each time you press the Up arrow, it'll go back one more previous command that you typed. It's like having a built-in mini-clipboard of all the last commands you typed out. Great stuff!
<drive letter>: - If you have multiple drive letters, as most of us at bare minimum have a main hard drive (usually C:) and a CD or DVD drive, you switch to a different drive by using this command, which for example, let's say we're on the DVD drive, which's letter happens to be D:, to go to our C: drive, we would simply type "C:" (that's the drive letter, in this case C, followed immediately by a colon) and we are now, on our C: drive. To go back to our D: drive, we would just type "D:". (The letter D and a colon).
Copying / Pasting -

Copying / Pasting works slightly different in the Command Window. The regular Ctrl+C, Ctrl+X, Ctrl+V won't work here. To copy a line in a Command Prompt, click the little icon at the top left of the window, choose "Edit | Mark". Then using your cursor, highlight the line(s) of text you want to copy. Again go to the icon and choose "Edit | Copy". You'll then copy whatever you highlighted to your clipboard.

To paste, click the icon, choose "Edit | Paste", and it'll paste whatever is on your clipboard where the blinking cursor is.

And really, that's about all you'll need to know for basic Command Window stuff!

But, hold on just a second! I mentioned that I'd point out the exception on using quotes in the command window. Sometimes you may need to still go old school and type path's out in the old DOS's limited 8.3 format ...

A quick explanation: filenames (and folder names) were never allowed to be longer (shorter is ok) than 8 characters, a dot and 3 characters. In other words, the file name "geekdrop.exe" is fine, (the word "geekdrop" is 8 letters, the dot, then "exe" is 3 letters) and will display as that in the command window, and you could type "geekdrop" in the Command Window, hit "enter" and it would launch the "geekdrop" program. However, in today's world, with Long File Names, sometimes that program could be named something like "geekdrops kick arse program.exe". So when looking at the folder from within a Command Prompt this program's name would only look like this: "geekdr~1.exe", no matter how long the name is, it'll trim the name down to 8 characters. The first 6 characters, a tilde, and a 1. The same pattern goes for folders. Most often seen when trying to get into your Program Files folder, in which case you would type "progra~1".

Not so tricky as long as you remember the formula. But you're on GeekDrop! So I'm about to show you a way around that!

Anytime you need to run a file, or navigate to a folder longer than that 8.3 limitation, or if it has a space in it's name, just wrap it in quotes! So, let's say you want to change the folder you're in to "C:\wow geekdrop is the coolest site ever", just type it exactly as follows: CD "C:\wow geekdrop is the coolest site ever"

It's usually up to you which way you prefer to do it. Sometimes it's actually easier to just use the old fashioned way ... less typing. However, be aware that some programs, shortcuts, etc. may require you to use the quote method or it won't find the path / file that it needs.

There ya have it! Not so scary after all, right? There are many more commands available that you can use, and advanced features. As always, the best way to learn is to do it the GeekDrop way ... roll those sleeves up, and just dive right in. Don't be afraid to make mistakes. Smile

I Averaged: 0 | 0 votes

Read More ...

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
missb's picture
Banned Member (Way To Go!)
Relationship Status:
Single & Not Looking
Joined: 01/16/2009
Posts: 3109
Drops: 3812
Mood: Weird
Re: The Windows Command Window - What Is It? How Do I Get ...
Very cool, thanks for this, I know it'll come in handy at some point Wink
PartyLizard's picture
Pretoria - South Africa
Premium Member (Silver)I'm a Code Monkey!The Steel CurtainI use FirefoxI use Google ChromeWindows UserFormer Phrozen Crew Member
Relationship Status:
Joined: 04/06/2009
Posts: 226
Drops: 243
Re: The Windows Command Window - What Is It? How Do I Get ...

I am giving away my age here but this "ugly black box" (like one of my colleagues calls it) is the way I started off on PC's
years ago and I still use it on a daily basis.

STaRDoGG's picture
Head Mucky MuckJoined the Dark SidePremium Member (Gold)I'm a Code Monkey!The Steel CurtainI use FirefoxI use Google ChromeI use Internet ExplorerI use SafariLinux UserMac UserWindows UserI donated to GeekDrop simply because I love it!Booga Booga BoogaI took a bite of the AppleFormer Phrozen Crew MemberI'm MagicMember of VileThe Dr. put the stem on the apple!The JokerSomeone thinks you're udderly delightful!
Relationship Status:
Single & Not Looking
Joined: 01/14/2009
Posts: 2604
Drops: 3076
Mood: Energetic
Re: The Windows Command Window - What Is It? How Do I Get ...
PartyLizard wrote:

I am giving away my age here but this "ugly black box" (like one of my colleagues calls it) is the way I started off on PC's years ago and I still use it on a daily basis.

Laughing same here. I started off on a DOS/Win 3.1 system (if ya exclude the tinkering I did on the old Commodore 64's as a kid) and still use the command line alot.

Google GeekDrop is your friend Wink
Smartmom's picture
Wellington Florida
Banned Member (Way To Go!)
Relationship Status:
Joined: 01/15/2009
Posts: 6392
Drops: -21
Mood: Giggly
Re: The Windows Command Window - What Is It? How Do I Get ...

I remember standing in line to buy windows 95 at Best BuyBest Buy when it came out, that was the time that everyone either had aol or was on prodigy (I was on prodigy). Fun times Laughing

Who's New

Redneck's picture
juanpabarri's picture
henta2002's picture
Vanillachinchilla's picture
versioniii's picture
xgensolutions's picture
OkwuteAgu's picture
CB_Latin's picture
GrimRapper's picture
glrobins's picture
hady's picture
Jessica Davis's picture
CRowmAN's picture
redd993's picture
Austeen Legitt's picture
facebook codes exploits tips tricks Phrozen Crew
All contents ©Copyright GeekDrop™ 2009-2020
TOS | Privacy Policy