Lab Report
Introduction to Computing
Lab No #08 Submitted To:
MS-DOS Engr. Mansoor
CMD Submitted By:
Usama Rehman
(23-BEE-23)
University of AJ&K
Chellah Campus
Task 1
Run cmd and view the contents of a directory
Task 2
How we can see the version of cmd.
Open CMD and then type [Link] will show the version of cmd.
Task 3
How we can change root directory and select the other directory instead of root
Directory.
• Open Command Prompt.
• To change to a directory that is not the root directory, you need to specify
the path of that directory after the cd command. For example, if you want
to change to a directory named "Documents" located in your user profile
directory, you can type:
cd C:\users\usama\Documents
• Press Enter.
• Now you have changed the current directory to the specified directory
("Documents" in this example). You can verify the change by typing ‘cd’
without any arguments and pressing Enter. This will display the current
directory path.
• If you want to navigate to a directory on a different drive, you can specify
the drive letter followed by a colon (:) and then the path of the directory.
cd C:\Data Folder
• This command will change the current directory to "Data Folder" on the
D: drive.
Task 4
How to create new directory.
• Open Command Prompt.
• Decide where you want to create the new directory. You can create it in
the current directory or specify a path for a specific location.
• Use the ‘mkdir’ command followed by the name of the directory you
want to create. For example, to create a directory named "NewFolder" in
the current directory, you would type:
mkdir NewFolder
• If you want to create a directory in a specific location, you can specify the
full path. For example:
mkdir C:\Data\NewFolder
• Press Enter.
• If the directory is created successfully, you'll see no output or error
messages. To verify that the directory was created, you can use the ‘dir’
command to list the contents of the current directory, or navigate to the
parent directory where you created the new directory and use dir there.
Task 5
Create new directory and copy file to the new directory.
Task 6
How to delete a directory.
Task 7
How to delete a file from the directory