You are on page 1of 8

COMPUTER ENGINEERING DEPARTMENT

Operating System Activity Manual

ACTIVITY 2: DOS Internal and External Commands


2.1

Program Outcomes (POs) Addressed by the Activity


a. ability to design a system, component, or process to meet desired needs within
realistic constraints such as economic, environmental, social, political, ethical, health
and safety, manufacturability, and sustainability, in accordance with standards
b. ability to identify, formulate, and solve engineering problems
c. broad education necessary to understand the impact of engineering solutions in a
global, economic, environmental, and societal context
d. ability to use techniques, skills, and modern engineering tools necessary for
engineering practice

2.2

Activitys Intended Learning Outcomes (AILOs)


At the end of this activity, the student shall be able to:
a. discuss DOS internal commands
b. discuss DOS external commands
c. use DOS internal and external commands to perform simple system administration
task

2.3

Objectives of the Activity


The objectives of this activity are to:
a. familiarize with different DOS internal and external commands
b. understand the different DOS internal and external commands
c. use the different DOS internal and external commands

2.4

Principle of the Activity

ACTIVITY 2: DOS INTERNAL AND EXTERNAL COMMANDS

DOS Internal Commands - is any command that resides in the COMMAND.COM file.
This includes the most common DOS commands, such as COPY and DIR.
DOS External Commands - are commands that reside in other COM files, or in EXE or
BAT files.
2.5

Materials/Equipment
1 PC unit
1 Keyboard and Mouse

2.6

Procedure/s
A. Setup
Notes: Perform the following steps BEFORE doing the exercises. Please WRITE LEGIBLY
in writing your answers. Do not close your DOS shell for checking of outputs.

1. Open your MS-DOS in your respective terminal.


2. Change drive to the C: drive - just type cd\ and hit enter.
3. Create a new directory called IOSLAB - MD IOSLAB (or MKDIR IOSLAB) and hit enter.
This is where you will do ALL your work for these exercises.
4. Change directory to that new directory - IOSLAB.
5. Create a file - COPY CON FILE1.TXT. Then type Hello DOS World!. When finished, hit
F6 or CTRL+Z and then enter. You will now see the message "1 file(s) copied" which means
you just created a file called file1.txt in the IOSLAB directory.
6. As a check, do the following - TYPE FILE1.TXT and you will see the contents of that file.
Also do a DIR and you will see the contents of the directory you're in (c:\IOSLAB). You will
see that file.
B. Exercises
Now you're ready to begin. Each numbered item has an answer (answer to the question,
commands used and/or analysis and observation of the step). Write your answers on the table
provided in the Activity Report section of this activity.
1.

Copy FILE1.TXT and make a file2.txt, file3.dat, file4.xyz, file5.txt. Pay attention to the
names and extensions of the files. (Write in the space provided the content of each file. Use
short phrases only.)
2. List out the directory and see ALL the newly created files.
3. Now you just want to see a list of the files that have TXT as their extension.
4. Make a copy of file4.xyz and call it first.dat
5. Create a subdirectory under the directory you're currently in. Call this new directory
TESTDIR.
6. Copy all the files with an extension of DAT to the new subdirectory.

ACTIVITY 2: DOS INTERNAL AND EXTERNAL COMMANDS

7. Change directories to the newly created directory and list all the files in there.
8. Delete file3.dat.
9. Go back up to the parent directory of the current directory you are in.
10.
List all the files with an extension of DAT in the current directory and the one you just
created. Use only one command to do so.
11. Change the name of file1.txt to file6.txt.
12. Create another directory TESTDIR2 and copy the directory/folder TESTDIR to the newly
created directory.
13. Delete the directory you created (TESTDIR). Are you able to do this? Why or Why not?
14. List all the files that start with FI and have an extension of TXT.
15. List all the files that start with the word FILE, then a single digit and an extension of
TXT.
16. Check the file attributes of file5.txt. What are the given attributes?
17. Give system, hidden and read-only file attributes to file5.txt.
18. Display the content of file5.txt
19. Combine file5.txt and file6.txt content to another filename combine.txt
20. Display the word I am now a GOOD DOS USER!
2.7

Activity Report
2.7.1

1.
C:\IOSLAB>copy FILE1.TXT file2.txt
1 file(s) copied.
C:\IOSLAB>copy FILE1.TXT file3.dat
1 file(s) copied.
C:\IOSLAB>copy FILE1.TXT file4.xyz
1 file(s) copied.
C:\IOSLAB>copy FILE1.TXT file5.txt
1 file(s) copied.

2.
C:\IOSLAB>dir
Volume in drive C has no label.
Volume Serial Number is C401-0466
Directory of C:\IOSLAB

ACTIVITY 2: DOS INTERNAL AND EXTERNAL COMMANDS

08/25/2016 02:28 PM <DIR>


.
08/25/2016 02:28 PM <DIR>
..
08/25/2016 02:30 PM
18 FILE1.TXT
08/25/2016 02:30 PM
18 file2.txt
08/25/2016 02:30 PM
18 file3.dat
08/25/2016 02:30 PM
18 file4.xyz
08/25/2016 02:30 PM
18 file5.txt
5 File(s)
90 bytes
2 Dir(s) 389,986,512,896 bytes free
C:\IOSLAB>
3.
C:\IOSLAB>dir *.txt
Volume in drive C has no label.
Volume Serial Number is C401-0466
Directory of C:\IOSLAB
08/25/2016 02:30 PM
18 FILE1.TXT
08/25/2016 02:30 PM
18 file2.txt
08/25/2016 02:30 PM
18 file5.txt
3 File(s)
54 bytes
0 Dir(s) 389,979,451,392 bytes free
C:\IOSLAB>
4.
C:\IOSLAB>copy file4.xyz first.dat
1 file(s) copied.

5.
C:\IOSLAB>md TESTDIR
6.
C:\IOSLAB> copy "C:\IOSLAB\*.dat" "C:\IOSLAB\TESTDIR"
C:\IOSLAB\file3.dat
C:\IOSLAB\first.dat
2 file(s) copied.

ACTIVITY 2: DOS INTERNAL AND EXTERNAL COMMANDS

7.
C:\IOSLAB\TESTDIR>dir
Volume in drive C has no label.
Volume Serial Number is C401-0466
Directory of C:\IOSLAB\TESTDIR
08/25/2016 02:40 PM <DIR>
.
08/25/2016 02:40 PM <DIR>
..
08/25/2016 02:30 PM
18 file3.dat
08/25/2016 02:30 PM
18 first.dat
2 File(s)
36 bytes
2 Dir(s) 389,979,447,296 bytes free

8.
C:\IOSLAB\TESTDIR>del "C:\IOSLAB\TESTDIR\file3.dat"

9.
C:\IOSLAB\TESTDIR>cd..

10.
C:\IOSLAB>type C:*.dat
C:file3.dat
Hello DOS WORLD!
C:first.dat
Hello DOS WORLD!

ACTIVITY 2: DOS INTERNAL AND EXTERNAL COMMANDS

11.
C:\IOSLAB>ren file1.txt file6.txt

12.
C:\IOSLAB>md TESTDIR2
C:\IOSLAB>copy "C:\IOSLAB\TESTDIR" "C:\IOSLAB\TESTDIR2"
C:\IOSLAB\TESTDIR\first.dat
1 file(s) copied.

13.
C:\IOSLAB>del TESTDIR
C:\IOSLAB\TESTDIR\*, Are you sure (Y/N)? Y
Yes I am able to do it using del command.

14.
C:\IOSLAB>dir FI*.txt
Volume in drive C has no label.
Volume Serial Number is C401-0466
Directory of C:\IOSLAB
08/25/2016 02:30 PM
18 file2.txt
08/25/2016 02:30 PM
18 file5.txt
08/25/2016 02:30 PM
18 file6.txt
3 File(s)
54 bytes
0 Dir(s) 389,970,657,280 bytes free

15. C:\IOSLAB>dir FILE*.txt


Volume in drive C has no label.
Volume Serial Number is C401-0466
Directory of C:\IOSLAB
08/25/2016 02:30 PM
08/25/2016 02:30 PM

18 file2.txt
18 file5.txt

ACTIVITY 2: DOS INTERNAL AND EXTERNAL COMMANDS

08/25/2016 02:30 PM
18 file6.txt
3 File(s)
54 bytes
0 Dir(s) 389,967,396,864 bytes free

16.
A

C:\IOSLAB>attrib "C:\IOSLAB\file5.txt"
C:\IOSLAB\file5.txt

17.
C:\IOSLAB>attrib -a +r +h "C:\IOSLAB\file5.txt"

18.

C:\IOSLAB>type file5.txt

Hello DOS WORLD!

19. The action cant be performed because no DOS file will do

20. C:\IOSLAB>echo "I am now a GOOD DOS USER!"


"I am now a GOOD DOS USER!"

ACTIVITY 2: DOS INTERNAL AND EXTERNAL COMMANDS

2.7.2

Observations

I observed that commands both internal and external in MS DOS are case insensitive.
And there are plenty of commands that can be used for to perform different activities but it is
important to know the correct syntax for it to work.

2.7.3

Conclusions

Upon doing this experiment I therefore conclude that there are several command used in
DOS that can also do the services offered in our Graphical User Interface it is just that in
Command Line Interface it is quite more complicated to use since there are commands needed to
be memorized and know their functionality. Therefore with a hands on activity in this class, I am
now familiar and was able to understand the different DOS internal and external commands

2.7.4
Section: E41

Date Performed: August 25, 2016

Course Code: IOS101L

Date Submitted: August 25, 2016

Course Title: Operating System


Instructor: Engr. Ricky Sandil
Name:

Signature:

1. Alcantara, Sammuel Joseph M.

ACTIVITY 2: DOS INTERNAL AND EXTERNAL COMMANDS