Sunday, May 18, 2008

Tuesday, March 4, 2008

DOS



In this post i will teach you how to do basic DOS commands for you computer. DOS (an acronym for Disk Operation System) is a tool which allows you to control the operation of the IBM PC. DOS is software which was written to control hardware. To change the default drive, simply type the letter of the your choice. The new default will be listed in subsequent DOS prompts.

Example:

  • C> A: [enter]
  • Changes the default drive from C to A.
  • A> C: [enter]
  • Changes the default drive from A to C.
[enter] means that you must press the Enter Key before the format command will execute. [Enter] is required after any DOS command, it is assumed in all commands found below.

CHDIR (CD) Change Directory Command

Once you have located the directory you want, you may move from directory to directory using the CD command (change directory)

Example:

  • C> cd furniture
  • Moves you to the directory called 'FURNITURE'
  • C> cd \furniture\chairs
  • Moves you to the directory called 'CHAIRS' under the directory called 'FURNITURE'.
  • C> cd ..
  • Moves you up one level in the path.
  • C> cd \
  • Takes you back to the root directory (c: in this case).

COPY Command

The COPY command can be used both to copy files from disk to disk or to create a second copy of a file on a single disk. (There are many more uses of the COPY command, but only the basic operation is discussed here.)

Example:

  • C> copy c:kermit.exe a:
  • Copies the file 'KERMIT.EXE' from the C drive to the A drive and gives it the same name.
  • C> copy a:brazil1.dat b:\south\brazil2.dat
  • Creates a copy of 'BRAZIL1.DAT' from drive A on drive B, putting it in the 'SOUTH' subdirectory and renaming it 'BRAZIL2.DAT'.
The key to use this command correctly is to remember that the first file specified after the COPY command is the source file, the second is the target:ehp1 file. The source is the file to be copied. The target will be the location and name of the new file. If the file name and extension are omitted after the target's drive specification, the new file will have exactly the same name as the source file.

Example:

  • C> copy a:myfile.txt b:
  • C> copy c:command.com b:com.com
  • C> copy b:golly.gee a:whao.boy
  • C> copy command.* a:
  • C> copy a:mymap.dwg c:\maps
Note: it is always good practice to us the complete file specifications for both source and target files, Be very sure of yourself before you accept defaults or employ wild-card characters. Otherwise you may end up with some interesting results. Incomplete or incorrect source names may result in errors, such as the command: copy edlin a:myomy.bat. Try it and see what happens.

ERASE Command

The ERASE command deletes specified files.

Example:

  • C> erase a:myfile.txt
  • Erases the file MYFILE.TXT from the diskette in the A drive. If no drive specification is entered, the system looks to delete the specified file form drive C (in this case).
  • FORMAT Command

    You must format new disks before using them on the IBM computers. The format command checks a diskette for flaws and creates a directory where all the names of the diskette's files will be stored.

    Example:

  • C> format a:
  • Formats the diskette in the A drive.
  • C> format b:
After entering this command, follow the instructions on the screen. When the FORMAT operation is complete, the system will ask if you wish to FORMAT more diskettes. If you are working with only one diskette, answer N (No) and carry on with you work. If you wish to FORMAT several diskettes, answer Y (Yes) until you have finished formatting all your diskettes.