Professional Documents
Culture Documents
Write A Command To Display The Contents of The Current (Home) Directory
Write A Command To Display The Contents of The Current (Home) Directory
INTRODUCTION TO MS-DOS
Open the MS-DOS command prompt and perform the following tasks
1. Write a command to display the contents of the current (home) directory.
To display the contents of the current directory we use command: dir
3. In your current (home directory), create another directory named UDSM. Confirm if the
new directory has been created.
To create a directory we use a command: md UDSM
To confirm if the new directory has been created, we use command: dir
4. Move from your current directory to the newly created directory (UDSM)
To move from current directory to UDSM: cd UDSM
5. Write a command to create a text file named coet, then put some words in it.
To create a text file we can use echo command: echo >coet.txt
To put some words we use almost same command: echo safari ndefu >coet.txt
To confirm if the new text file has been created, we use command: dir
To confirm our task, we check again the contents of our directory (using dir):
8. Copy the file created (udasa.txt) from UDSM directory to home directory.
To copy a file we use command copy: copy udasa.txt c:\users\kasinge
11. Move from current disk drive C to another drive (example: drive D)
12. While in your current disk drive C, view the directories and files of another drive (e.g.
drive D)
13. In your home directory, display all directories and files starting with letter d.
14. In your home directory, display all directories and files ending with letters ts.