Printer Friendly
Dictionary, Encyclopedia and Thesaurus - The Free Dictionary
1,761,710,708 visitors served.
forum mailing list For webmasters
?
New: Language forums
Dictionary/
thesaurus
Medical
dictionary
Legal
dictionary
Financial
dictionary
Acronyms
 
Idioms
Encyclopedia
Wikipedia
encyclopedia
?

DOS abc's - How to enter a command

    0.06 sec.

DOS abc's - How to enter a command

These tutorials are in sequence. Be sure you understand the content of

DOS abc's - How a disk is organized.

THE DOS PROMPT
You type in a command, and DOS carries it out.

DOS tells you when it is ready to accept a command by displaying its "prompt" on screen. The DOS prompt also informs you which drive and directory you're currently in. The following prompt means C drive and root directory:

C:\>

The C: means drive C. The backslash \ means root directory. The > is an end symbol.

If you switched to the DATA directory, your prompt would change to:
                C:\DATA>.

              C:    C drive
              \     root directory
              DATA  data directory
              >     end of prompt


Are We in Sync?
Does your on-screen prompt look like the examples above? If it does not, and all you see is C> or D> no matter which directory you're in, you're missing an important command in your AUTOEXEC.BAT file.

For now, type the following command at the DOS prompt:
prompt $p$g

Later on, you will want to set this prompt permanently. See DOS prompt and DOS AUTOEXEC.BAT.

Can't Get the DOS Prompt?
All DOS commands in this tutorial are run from the DOS prompt. If your computer starts up with a menu of programs to run, you'll have to exit this menuing system (also called a shell) first.

Usually there's a "To DOS," "DOS prompt" or "Command Prompt" option in the menu. Select it to get your DOS prompt.

Pressing Enter Executes the Command
After you type in your command, pressing the Enter key causes DOS to begin the action. The following command renames a file from RED to BLUE. The action is taken when you press the Enter key:
             C:\>rename red blue(ENTER)


You must have a space between the command verb Rename and the next word.

In further examples, you won't see the (ENTER) notation. It is however always implied. Nothing happens until you press Enter!

Switching Directories
Assume you have the following directories on your hard disk:



If you're in the C:\DATA> directory now, and you want to go to the C:\WORDS> directory, you would type:

    C:\DATA>cd \words      change to WORDS
    C:\WORDS>              prompt has changed


               cd \words   means

    CHANGE TO   ROOT  then  WORDS
    cd           \          words


Switch back to the root directory by typing:

      C:\WORDS>cd \       change to root directory
      C:\>                prompt has changed


      CHANGE TO   ROOT
      cd            \


Subdirectories
Subdirectories are directories subordinate to your main directories. The following example shows two subdirectories (subfolders) that are attached to the WORDS directory.



For more on directories and subdirectories, look up DOS directories.

Switching Drives
To switch from one drive to another, type the drive letter and colon as in the following examples:

   C:\>d:     change from C to D
   D:\>       prompt has changed to show new drive

Switch to A:

   D:\>a:     change from D to A
   A:\>       prompt has changed


Remember!
Don't forget the colon. The letter A by itself would be a file name, not a drive ID. The a: identifies the A drive.

To review...
  DOS is a master control program that lets you
  run a program and manage files.



How to thank TFD for its existence? Tell a friend about us, add a link to this page, add the site to iGoogle, or visit webmaster's page for free fun content.
?Page tools
Printer friendly
Cite / link
Email
Feedback
? Mentioned in
 
Encyclopedia browser? ? Full browser
 
 
Encyclopedia
?

Disclaimer | Privacy policy | Feedback | Copyright © 2009 Farlex, Inc.
All content on this website, including dictionary, thesaurus, literature, geography, and other reference data is for informational purposes only. This information should not be considered complete, up to date, and is not intended to be used in place of a visit, consultation, or advice of a legal, medical, or any other professional. Terms of Use.