Tuesday, July 15, 2008

#5 Erasing, Renaming, Moving

Erase deletes a file or group of files from the disk

It is an internal form

Form: ERASE filespec

RENAME changes the name of a file or a group of files

It is an internal form

Form: REN[NAME] filespec filename [.ext]

MOVE changes the name of a directory

It is an internal type

Form: move

#4 Copying Files

COPY command is used to copy one or more files from one disk to another. An additional copy of the given file on the same disk but with a different file name.

It is an internal command

Format: COPY [d] filespec [d:] [filename [.ext]]

Files can be copied from one directory to another, but both source and target directories must be specified .

There is also the DISKCOPY command, which allows one to copy from one diskette onto another. This copies an exact image of the source isk on the target disk.

It is external.

Format: DISKCOPY [d:] [d:]

#3 Directories

In DOS, to see files, one must use the DIR command.Default will be assumed if not specified.

Wild Card Characters are used to find common links between files i.e. same extention or file name

There are subdirectories as well though. They are contained in the parent directory

There are three commands for dealing with directories

  1. MD - to create a new subdirectory
  2. a.RD - remove directory b. DELTREE - remove subdirectroy even if its not empty
  3. CD - move from one directroy to another
  4. TREE - display all subdirectories from any point in the directory (may be disabled)

Folders have to be specified

The CD command is used to move around directory tree.

A fully qualified path should always be mentioned

Format: DIR [d:] [filename [.ext]] [/p] [/w]

#2 Commands

There are various commands that are contained in command.com on DOS

These are the Internal Commands:

  • DIR - lists files in directory
  • TYPE -displas file contents on the monitor
  • DATE - changes system date
  • RENAME - renames files
  • COPY- copies one or more files
  • ERASE - deletes one or more files
  • TIME - changes time

These are the External Commands. These must be booted from a disk since they are not directly in DOS

  • CHKDSK - checks status
  • DISKCOPY - copies a diskette
  • FORMAT - prepares a disk for use

...

The Format command is important; a disk cannot be used if it hasn't been formatted

The Directory command shows all the files; like an index in a book. One can pick out files with a common characteristic by using Wild Card Characters

#1 How To Get Started With Dos

Even though most people use Windows, DOS is still used. Things are more powerful with DOS and its interface is more similar to UNIX's. You can do the same things on DOS as on Windows, such as FORMAT, COPY, make a DIR, and ERASE.

There are certain things that will be covered such as:
  • Working with Directories
  • Creating Directories

Other Basic File Manipulations