squeak!
Syllabus Homepage
Course Overview
Course resources
Day 1
Day 2
Day 3
Day 4
Common errors
Internet Glossary
About Your Instructor
Credits: This site powered by the vi text editor, apache webserver, perl scripting, and Debian linux.
squeak!

DOS mantra:

  1. Understand exactly what you want to do, then select the handiest tool to accomplish it.
  2. "command /?" will display help
  3. Syntax is "command [switches] [arguments]"; hit the Enter key when you are ready to execute the command. Pay attention to the spaces ("when in doubt, space it out")!
  4. there is always a <space> between commands, switches, and arguments. You must hit <enter> when you're ready to execute your command.

DOS Part 1 - Day 2

Goals

In this session you will:
  • use DOSKEY to improve your command-line interaction
  • learn to use relative and absolute paths
  • use the informational commands (VER, TIME, DATE, CLS)
  • use the file commands (COPY, REN, MOVE, DEL, TYPE)
  • use the environmental variable commands (SET, ECHO, PROMPT)

Review

Skill Test

  1. Get to a DOS prompt if you are not there already.
  2. Look at your prompt to figure out what drive and directory you are in.
  3. Go to your A: (floppy) drive.
  4. Look at your prompt again.
  5. View the help screen for the DIR command.
  6. Look at the contents of your current directory
  7. From this location on your A: drive, view the contents of the c:\windows directory.
  8. Now view only the .ini files in c:\windows (or c:\winnt) directory

DOSKey p337

  • necessary in 9*, less so in NT
  • DOSKey gives your command line a history or memory.
  • F7 shows your history p. 339
  • F9 allows you to select a command line by number
  • DOSKEY is resident only in the current DOS session/window.

Paths - relative v. absolutes paths p.82-3

absolute path: precise directions to a file, beginning with the root directory. Ex: "\windows\temp\myfile.txt"
relative path: subjective directions to a file, starting from your present directory subjective directions to a file, starting from your present directory. Ex: temp\myfile.txt.

One special set of helpers for describing relative paths are:
. = "the current directory"
.. = "the parent directory" (one up)

Simple Information: VER p.41, DATE , TIME

CLS - clear your screen p.47

File handling commands

  • COPY: copy oldfile newfile
  • REN (rename): ren oldname newname
  • MOVE: move oldpath newpath
  • DEL: del filename
  • RD: del dirname p. 288
  • DELTREE (WARNING: destroys entire directory): del [path] p. 289
  • TYPE (print to output the contents of a textfile): type filename

Environmental Variable commands p 553

Environmental variables are like little named "containers" in memory that can hold a value.
for example you might make "USER"="jason".
  • SET: set variable=value
  • ECHO: echo %variable% p554
  • PROMPT: see the /? screen! This var controls the layout of the command prompt!
  • change a var by overwriting it
  • add to a var by appending: set test=%test%;newstuff

Disc Utilities

  • How discs work: FAT/NTFS
  • defrag - making fragmented files contiguous
  • scandisc - fixing disk errors
  • format - normal and quick formatting

Batch files - lite! - Chap 10
  • just like stacked command lines
  • REMark out comments p.480
  • an additional use for echo: @echo off
  • passing arguments: %1, %2, %3, etc. p. 492
  • pause p482


    http://www.mousetrap.net/syllabus/dos/day2.html
    $Id: day2.orb,v 1.5 2001/11/01 16:05:27 mouse Exp $

    Remember, your login is based on your machine's hostname, not on any other number.
    ~/[initials] refers to the subdirectory under your homedir, named after your initials. Everything except for .dotfiles will be stored in your ~/[initials] directory.


© 1995-2001 jason carr
Distributed under the terms of the GNU Free Documentation License.