Top Banner
Basic DOS How to get some work done
28

Basic DOS How to get some work done. It’s all a file Everything is a file: OS files, Application files, Data files and Game files Files have 8.3 names:

Jan 19, 2016

Download

Documents

Clinton Morris
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Basic DOS How to get some work done. It’s all a file Everything is a file: OS files, Application files, Data files and Game files Files have 8.3 names:

Basic DOS

How to get some work done

Page 2: Basic DOS How to get some work done. It’s all a file Everything is a file: OS files, Application files, Data files and Game files Files have 8.3 names:

It’s all a file

• Everything is a file: OS files, Application files, Data files and Game files

• Files have 8.3 names: up to eight characters for name, a period, and up to three characters for file extension

• File names longer than this require quotes around the name

• We store files in Directories/Folders

Page 3: Basic DOS How to get some work done. It’s all a file Everything is a file: OS files, Application files, Data files and Game files Files have 8.3 names:

Drives

• Drive “names” are single letters followed by a colon

• Properly, it is A: and B: for floppy disk drives

• Hard disk drives (and other drives) start at C: and go to Z:

• That means we can have 26 drives in a system

Page 4: Basic DOS How to get some work done. It’s all a file Everything is a file: OS files, Application files, Data files and Game files Files have 8.3 names:

Changing Drives

• Type the drive letter followed by the colon and press <Enter>

• A:\> C: takes you to the C: drive

• C:\> A: takes you back to A: drive

• We can “address” or execute a file on another drive C:\> A:FDISK will run the program FDISK that is located on the A: drive

Page 5: Basic DOS How to get some work done. It’s all a file Everything is a file: OS files, Application files, Data files and Game files Files have 8.3 names:

Directories

• We store files in Directories or Folders

• To see the file(s) in a directory, we typeA:\> DIR <Enter>

And we get a list of the files

Page 6: Basic DOS How to get some work done. It’s all a file Everything is a file: OS files, Application files, Data files and Game files Files have 8.3 names:
Page 7: Basic DOS How to get some work done. It’s all a file Everything is a file: OS files, Application files, Data files and Game files Files have 8.3 names:

Organizing Files

• Use directories and subdirectories; start with Root Directory (C:\)

Root DirectoryC:\

DataApps Stuff

FebJan

MyFile01MyFile01

MarThis is legal since fully qualified file name is:C:\Data\Jan\MyFile01

File name here is:C:\Data\Feb\MyFile01

Page 8: Basic DOS How to get some work done. It’s all a file Everything is a file: OS files, Application files, Data files and Game files Files have 8.3 names:

Case

• DOS is not case-sensitive like most UNIX systems are – DIR, Dir and dir all mean the same

• The first thing the Command Interpreter does is to upper-case what you have typed

Page 9: Basic DOS How to get some work done. It’s all a file Everything is a file: OS files, Application files, Data files and Game files Files have 8.3 names:

Internal and External

• COMMAND.COM is the Command Interpreter and consists of many “chapters” or includes many commands

• We call these “Internal Commands”• You don’t have to go anywhere or

reference anything to use these commands

• DIR, CD, RD, MD, COPY, MOVE are internal commands

Page 10: Basic DOS How to get some work done. It’s all a file Everything is a file: OS files, Application files, Data files and Game files Files have 8.3 names:

Focus

• DOS is focused on the current directory and the “prompt” will tell you

• C:\DOS> means we are in the DOS directory of the C: drive

• If the command you typed is not an internal command, DOS looks in the current directory for the file/program

• DOS is also focused on the drive (C: above)

Page 11: Basic DOS How to get some work done. It’s all a file Everything is a file: OS files, Application files, Data files and Game files Files have 8.3 names:

PATH

• The PATH is an environmental variable that holds a list of directories to search for a program

• C:\DOS;C:\WP5;A:\;D: is a valid path

• DOS will search the PATH for the program you requested if the PATH is set

Page 12: Basic DOS How to get some work done. It’s all a file Everything is a file: OS files, Application files, Data files and Game files Files have 8.3 names:

Path

• Fully Qualified Name is also the Path (to the file):

• C:\Data\Jan\MyFile01

Path

File Name

Page 13: Basic DOS How to get some work done. It’s all a file Everything is a file: OS files, Application files, Data files and Game files Files have 8.3 names:

Errors

• If DOS can do what you asked with the information provided, it usually does not say much

• If DOS can’t do what you asked, it returns an error Bad Command or File Name

Page 14: Basic DOS How to get some work done. It’s all a file Everything is a file: OS files, Application files, Data files and Game files Files have 8.3 names:

Program Files

• DOS can only “run” three types of files and these end in .COM, .EXE or .BAT

• .COM and .EXE files are compiled (binary) files; .BAT files are text files that you can create and run

Page 15: Basic DOS How to get some work done. It’s all a file Everything is a file: OS files, Application files, Data files and Game files Files have 8.3 names:

Additional Information

• Some commands do not require additional information, but most do

• DIR will give you a directory of the current directory, DIR c:\DOS would give you a directory of the DOS directory

• If the command expects more data and you don’t provide it, DOS will use current directory and/or drive

Page 16: Basic DOS How to get some work done. It’s all a file Everything is a file: OS files, Application files, Data files and Game files Files have 8.3 names:

Make Directory

• MD <name> will create a new directory, under the current directory

• Name is eight characters no period and no extension (unless you are Microsoft)

• New directory will only have two entries:The “dot” file for current directory

The “double dot” file for parent (up one level) directory

Page 17: Basic DOS How to get some work done. It’s all a file Everything is a file: OS files, Application files, Data files and Game files Files have 8.3 names:

Notice no response from MD

Page 18: Basic DOS How to get some work done. It’s all a file Everything is a file: OS files, Application files, Data files and Game files Files have 8.3 names:

Changing Directories

• Use the CD <name> command

• Allows you to go down one level

• CD .. Will take you up one level

• You can get fancy, just watch carefully if you do!

Page 19: Basic DOS How to get some work done. It’s all a file Everything is a file: OS files, Application files, Data files and Game files Files have 8.3 names:
Page 20: Basic DOS How to get some work done. It’s all a file Everything is a file: OS files, Application files, Data files and Game files Files have 8.3 names:

Remove Directory

• Use RD <name> to remove the named directory that is directly below your current directory

• Removed directory has to be empty before you can remove it

Page 21: Basic DOS How to get some work done. It’s all a file Everything is a file: OS files, Application files, Data files and Game files Files have 8.3 names:
Page 22: Basic DOS How to get some work done. It’s all a file Everything is a file: OS files, Application files, Data files and Game files Files have 8.3 names:

Delete a file

• Use DEL <file name> to remove a file in the current active directory

Page 23: Basic DOS How to get some work done. It’s all a file Everything is a file: OS files, Application files, Data files and Game files Files have 8.3 names:

Wild Cards

• The asterisk, shift-8, will replace up to eight characters. Thus *.* is any file with any extension

• The question mark will replace ONE character. Thus file? Would be file1, file2, file3 and so on

Page 24: Basic DOS How to get some work done. It’s all a file Everything is a file: OS files, Application files, Data files and Game files Files have 8.3 names:

Copy

• Use COPY <what> <where> (note two parameters required, each separated by one (or more) spaces

• COPY A:\*.COM C:\DOS\*.* would copy all files with .com extension from the A: drive to the C:\DOS directory (directory must exist already)

space

space

Page 25: Basic DOS How to get some work done. It’s all a file Everything is a file: OS files, Application files, Data files and Game files Files have 8.3 names:
Page 26: Basic DOS How to get some work done. It’s all a file Everything is a file: OS files, Application files, Data files and Game files Files have 8.3 names:

FDISK

• Does not require any parameters – presumes you don’t have drive letters yet

• Is an External program; it is located in the root directory of A:

• To run it A:\ fdisk <Enter>

Page 27: Basic DOS How to get some work done. It’s all a file Everything is a file: OS files, Application files, Data files and Game files Files have 8.3 names:

FORMAT

• DOES require a parameter: the drive letter you want to format

• It will be located on the RAM drive created when DOS loads from the startup disk

• The poor guy in Alaska

Page 28: Basic DOS How to get some work done. It’s all a file Everything is a file: OS files, Application files, Data files and Game files Files have 8.3 names:

The Boot Process

• Part of DOS loads, with support (or not) for CD drive

• Creates a RAM drive; a section of memory (RAM) that gets a drive letter and can store files

• Uncompresses several files and places them in the RAM drive

• RAM drive will get next drive letter after hard disk drive and before CD drive