Professional Documents
Culture Documents
BS COMPUTER SCIENCE
LIST OF EXPERIMENTS
Objectives:
customize the command line
use DOS commands to view and navigate directories
Background: All computer and network technicians should know some of the basic
commands and functions available from the command line in Windows. Microsoft’s Disk
Operating System (DOS), also called MS-DOS, is a collection of programs and
commands used to control the overall computer operation in a disk-based system. All
modern Windows versions support DOS commands from the command line. DOS allows
you to even edit the command line and change the way it behaves.
Task: The Prompt: The DOS prompt is what you see when you first open a command
line window. The default prompt is C:\, or your current patch. The prompt can be
changed, using the prompt command. The prompt command uses the syntax prompt
text, where text can be anything you want. There are also several preconfigured prompt
parameters you can use. Try changing the prompt using the following commands:
Command What is displayed at the prompt?
prompt $q ____________
prompt $$ ____________
prompt $t ____________
prompt $d ____________
prompt $p ____________
prompt $v ____________
prompt <Your Name>’s PC $d $p ____________
Change your prompt back to the default to finish the lab: prompt $p$g
You can also use a wildcard to search for files. The * is a wildcard which can be used in
place of all or part of a filename, to use a command on many files at once. The *
wildcard replaces any number of letters before or after the dot in a filename.
Objectives:
use DOS commands to create and delete directories
Background: All computer and network technicians should know some of the basic
commands and functions available from the command line in Windows. Microsoft’s Disk
Operating System (DOS), also called MS-DOS, is a collection of programs and
commands used to control the overall computer operation in a disk-based system. All
modern Windows versions support DOS commands from the command line. DOS allows
you to even edit the command line and change the way it behaves.
Objectives:
use DOS commands to copy, move, rename, delete files and change attributes
Background: All computer and network technicians should know some of the basic
commands and functions available from the command line in Windows. Microsoft’s Disk
Operating System (DOS), also called MS-DOS, is a collection of programs and
commands used to control the overall computer operation in a disk-based system. All
modern Windows versions support DOS commands from the command line. DOS allows
you to even edit the command line and change the way it behaves.
Task 1: Create files
To create a file in DOS, use the copy con filename command. This command will copy
the text from the console and make it into a new directory. After you type this command
you will have a blank line on the command prompt. You can then type in text that will be
saved in the newly created file. When you are finished typing in your message, hold
down the Control Key (<Ctrl>) press the Z key and then press the Enter key. This key
combination will end the message and DOS will display “1 file(s) copied”.
The minus (-) option will remove an attribute value from a file and the plus (+) option
will add an attribute value to a file. As discussed early, valid attribute values are R (read-
only), A (archive), S (system), H (hidden).
Task: Display Hidden Files – you can show hidden files with the /AH or /a switch
type: dir /AH
type: dir /a
Is sample3.txt displayed? __________
What is the difference between these 2 commands? ________
You can also use the copy command to make a 2nd copy of a file, with a new name.
Task: Make a backup of the sample2.txt file
type: copy sample2.txt backup1.bak
type: dir
Are the new backup file and the original there? __________________
NOTE: At this point, you need to display your work to the instructor:
cd\
cd it
dir (new.txt, backup1.bak)
cd /pcs (sample1.txt, sample2.txt, sample3.txt)
attrib (sample1.txt – R, sample2.txt – A, samplet.txt – H)