Thursday, February 28, 2008

MOVE command

This command will change the name of a diretory
FORMAT: move

RENAME command

Thsi command will change the name of a file or a group of files
FORMAT: REN filespec filename[.ext]
e.g.
REN a:oldfile a:newfile
REN *.exe *.xxx

ERASE command

This command delete a file or group of files from the disk
FORMAT: ERASE filespec
or
DEL[ETE] filespec


For example
erase history.*
erase *.bat

DISKCOPY Command

The DISKCOPY command allows you to copy one diskette onto another. Unlike the COPY command, which copies individual files, the DISKCOPY command makes an exact image of the source disk on the target disk.
NOTE; DISKCOPY will destory all the data that is orginally on the target drive.

Format: DISKCOPY [d:] [a:]

COPY files in DOS

The COPY command is used to copy one or more files from one disk to another. It also allows you to make an additional copy of a given file on the same disk but with a different name.
General form: copy what to where [and called]
Format :COPY[D:]filepec [d:][filename[.ext]]

Moving around the directory tree

We use the cd (change directory) command.
1.To move from any directory to the root of the drive we type cd\
THIS IS BECAUSE THE "\" CHARACTER REFERS TO THE ROOT.

2.To move from any directory to its immediate parent diretory we type cd.. because the two dots are the way we refer to the parent.

3.If we type cd. instead of cd.. the command just leave you in the diretory that you are in.

4.If we just type cd itself, it will cause DOS to out put a fully qualified path for the current diretory.

Directory in DOS



When we need to see which files are on the disk,


in Windows, we just right click on the start button and then choose explore.


In DOS, we use the DIR command.


DIR stands for directory, which is used to list the directory of the disk. This allows us to see which files on the disk.
Format: DIR[d:][filename[.ext]][/p][/w]
Items in [...] are optional, but if they are not supplied,certain default values may be assumed.

Some DOS concepts and commands

the DEFAULT DRIVE
It is the currently logged drive,i.e. the drive that you have, somehow, focused the computers attention on. It is in this drive that DOS expects to find the programs and files that you refer to.

We can also change the surrent drive.
For example, changing from the C drive to A drive. While on drive C we type
c:\>a:
and the computer responds with
a:\>
In this example we started with the default drive c: and we switched to a: as the default.
By the way, did you notice the colon ":"? It is part of the drive designation.
Some important DOS commands
I. From DOS's perspective
1. Internal commands. These are commands that are contained in command.com
e.g.
DIR ,COPY ,TYPE ,ERASE ,DATE ,TIME ,RENAME
2.External Commands. These are commands that are not contained in the program command.com. Each time that DOS needs to execute them, it must load them from the disk.
e.g.
CHKDSK, DISKCOPY, FORMAT
II.From user's perspective
Date: Date
Time: Time
File: COPY,DEL,DIR,ERASE,RENAME,TYPE
Disk: SCANDISK,DISKCOPY,FORMAT

In case

Even though we generally boot off of the hard drive its important to have a "rescue disk" or CD avaliable in case of a system crash or hard drive failure.

DOS as Operating System

We use the operating system primarily for the following functions:
  • Preparing and organizing disks for use
  • Formatting diskettes
  • Setting up directories and sub-directories
  • running programs
  • Copying and moving files

In DOS, we use the following commands

  • FORMAT-prepare a disk for use
  • COPY-make a copy of a file
  • CHKDSK-check the characteristics of the disk and system

DOS provides the software substructure and facilities for the other programs that run on the computer.

It will allows us to:

  • run programs
  • keep trackof files on the disk
  • handle the input and output

What is DOS 2




In DOS, we type commands to DOS and DOS carries them out for us.

For example, to turn up the volume, you might type some words like volume:10
To turn down the volume, you might type volume:3
So, in DOS,
to copy a file we type copy
to set the date we type date
So, DOS is different from Windows. In windows, we use pictures, called "icons".


What is DOS?

MS-DOS is a "Disk Operating System". That means it is simply: "a System for Operating the Disks", (but MS-SOD doesn't sound as nice). In practice however, just as Windows does more than just print windows, DOS does more than just operate the disks: It enables the user to organise data files, load and execute (run) program files, and control the input and output devices attached to the computer. There are other brands of DOS besides the most well known "MS-DOS", ie: PC-DOS, DR-DOS/OPENDOS. Generally speaking, they will all function in the same way, especially at the most simple level.