Laboratory Exercise 1 Dos Commands Bondoc
Laboratory Exercise 1 Dos Commands Bondoc
LABORATORY EXERCISE
FIRST SEMESTER: AY: 2021 – 2022
LABORATORY EXERCISE 1
DOS COMMANDS
Learning Objectives
The students shall be able to familiarize the environment of CLI
The students shall be able to apply the use of different DOS commands
Background
DOS (Disk Operating System) was the first widely-installed operating system for IBM-
compatible personal computers. DOS is a non-graphical line-oriented command-driven
computer operating system. It has a relatively simple--but not overly "friendly"--user interface.
The earliest versions of the Microsoft Windows operating system were really just applications
that ran on top of the MS-DOS operating system. Modern versions of Windows (Windows 95
and greater) no longer run on top of DOS, but do retain a DOS-like user interface called the
"MS-DOS Prompt" or "Command Prompt". The command prompt allows Windows users to
issue DOS commands to the system. DOS commands are useful to Windows users for a variety
of reasons. Many tasks that can be performed in the Windows graphical environment can be
performed much more quickly and efficiently by utilizing DOS commands. Also, most bootable
floppy disks will boot the system directly to a DOS environment.
Materials/Resources
PC/Internet
Pen
Notepad++, notepad, sublime, etc.
Apache and MySQL Server (XAMPP)
Web Browser (Internet Explorer, Mozilla, Google Chrome, Etc.)
Word-processing program
Laboratory Activity
Instructions: Perform the following steps.
1. Use cmd command and open command windows
2. Use the DOS help command and get idea about md (mkdir) and cd commands
3. Use DOS help and get idea on dir command to display information on the folders
4. Type the following command and see the different
Ramon Magsaysay Memorial College
LABORATORY EXERCISE
FIRST SEMESTER: AY: 2021 – 2022
1. DIR
2. DIR /p
3. DIR /w
4. DIR /L /P
5. DIR *.EXE
6. DIR A*.*
7. DIR ?????.*
8. DIR C:\Windows\system
9. CD Desktop
10. CD ..
5. Use DOS command to create the following folder structure (Create Home folder
in your desktop)
HOME
MY OUSL OTHER
CPCA FILM
TAGALOG ENGLISH
6. Use notepad and save all command that are used to create above structure.
(name the file as structure.bat and save on Home folder)
7. Use the DOS help command and get idea about copy, ren, mov, tree, del and
xcopy commands
8. Use notepad and create 3 file name ca.txt, tagalog.txt and info.txt save these
files
a. ca.txt file on CPCA
b. tagalog.txt file on tagalog
Ramon Magsaysay Memorial College
LABORATORY EXERCISE
FIRST SEMESTER: AY: 2021 – 2022
c. Info.txt file on my
d. tagalog.txt file on English
9. Use notepad and type “this is a computer application data” on a ca.txt
10. Use find command and find the file name with the text “application data”
11. Rename Sinhala.txt file in English folder as eng.txt
12. Go to HOME folder and see the folder structure through the tree command
13. Create another folder name MYDATA on desktop and copy all the files using
XCOPY command
14. Move all files are available in the MYDATA folder into OTHER
15. Delete ca.txt file on the OTHER folder
16. Use the DOS help command and get idea about attrib command
17. use attrib command and hide CPCA folder
18. Copy structure.bat file into my folder and execute it
19. Identify what is the task of the following commands
a. Osk
b. Notepad
c. Time
d. Msconfig
e. Ping 127.0.0.1
f. Ipconfig
g. Ver
h. Start
i. Path
j. Cls
20. Use dos command and identify Network information on your Computer
Ramon Magsaysay Memorial College
LABORATORY EXERCISE
FIRST SEMESTER: AY: 2021 – 2022
-CMD command provides a way for users to interact with the operating system and execute
various commands and programs. When you type a command into the Command Prompt, it
performs the corresponding action. The syntax of the command usually consists of a
command verb followed by one or more arguments, which specify the parameters for the
command.
3. What are the command that base of directory and explain each commands?
pwd - stands for "print working directory." This command displays the path of the current
working directory.
cd - stands for "change directory." This command is used to navigate to a different directory. For
example, to navigate to the home directory, you would use cd ~.
Ramon Magsaysay Memorial College
LABORATORY EXERCISE
FIRST SEMESTER: AY: 2021 – 2022
ls - stands for "list." This command displays a list of files and directories in the current directory.
To see hidden files, you can use ls -a. To see more information about each file, including
permissions, size, and modification date, use ls -l.
mkdir - stands for "make directory." This command is used to create a new directory. For
example, to create a directory called "new_folder," you would use mkdir new_folder.
rmdir - stands for "remove directory." This command is used to delete an empty directory. For
example, to delete a directory called "old_folder," you would use rmdir old_folder.
cp - stands for "copy." This command is used to copy files or directories. For example, to copy a
file called "file1.txt" to a directory called "new_folder," you would use cp file1.txt new_folder/.
mv - stands for "move." This command is used to move or rename files or directories. For
example, to rename a file called "file1.txt" to "file2.txt," you would use mv file1.txt file2.txt.
rm - stands for "remove." This command is used to delete files. For example, to delete a file
called "file.txt," you would use rm file.txt.
Output
Ramon Magsaysay Memorial College
LABORATORY EXERCISE
FIRST SEMESTER: AY: 2021 – 2022
Source Code
1. C:\Users\user>CD Desktop
2. C:\Users\user\Desktop>MKDIR Home
3. C:\Users\user\Desktop>CD Home
4. C:\Users\user\Desktop\Home>MKDIR My
5. C:\Users\user\Desktop\Home>MKDIR OUSL
6. C:\Users\user\Desktop\Home>MKDIR OTHER
7. C:\Users\user\Desktop\Home>CD OUSL
8. C:\Users\user\Desktop\Home\OUSL>MKDIR CPCA
9. C:\Users\user\Desktop\Home\OUSL>CD..
10. C:\Users\user\Desktop\Home>CD OTHER
11. C:\Users\user\Desktop\Home\OTHER>MKDIR FILM
12. C:\Users\user\Desktop\Home\OTHER>
13. C:\Users\user\Desktop\Home\OTHER>CD FILM
14. C:\Users\user\Desktop\Home\OTHER\FILM>MKDIR TAGALOG
15. C:\Users\user\Desktop\Home\OTHER\FILM>MKDIR ENGLISH
Conclusion
The Command Prompt is an important tool for any Windows user, especially those who are
more advanced or have a need to automate tasks and perform advanced functions. Whether
you're a system administrator, developer, or just someone who likes to tweak their system,
understanding how to use CMD can greatly enhance your productivity and allow you to
perform tasks more efficiently.