Lists the content of a directory.  To view more options use DIR /?


Clear the screen


Changes to a new directory.  For help type CD /?

CD \

Changes to the root of the current drive

CD ..

Changes to the parent directory of the current directory


Creates a directory in the current directory or path specified.  For help type MD /?


Removes a directory.  For help type RD /?


Rename a file

Redirect command


Used to verify a file is created


Used to copy a file


  1. Click in the Search Box
  2. Type cmd and hit Enter

Notice you will be at C:\Users\Your Username.  Which is your user home folder.  This is what was shown on my computer command prompt” C:\Users\student\Documents>” where student is my username

  1. Type dir

 You will see all the directories that exist in your home folder

  1. Type cd Documents

 You are now in the Documents folder. 

  1. Type md folderA FolderB folderC
  2. Type dir

 Observe how many folder are now in the Document directory

  1. Change to the FolderB Type cd FolderB
  2. Type the following commands below and hit Enter after each line is typed:

echo hello how are your > myfile.txt

for /l %a in (1 1 2) do type nul > “test%a.txt”

for /l %a in (1 1 2) do type nul > “execute%a.exe”

for /l %a in (1 1 2) do type nul > “excel%a.xls”

for /l %a in (1 1 2) do type nul > “word%a.doc”

for /l %a in (1 1 2) do type nul > “powerpoint%a.ppt”

  1. Type cls
  2. Type dir

Observe the different types of files that are created and look at the file extensions

  1. View all .exe files in FolderB. Type dir *.exe
  2. Copy all .exe files from FolderB to folderA. copy *.exe c:\Users\student\Documents\folderA

Note: student is the name of the user.  So make sure you use the correct username.  We also had to use the full path to folderA.

  1. Type cd ..
  2. Type cd folderA
  3. Type dir

Notice the file all the .exe files are copied to folderA.  Go to the Documents folder using File Explorer  and view all of everything you have created.  Then go back to and continue working from the command prompt

  1. Rename the execute1.exe to program1.exe ren execute1.exe program1.exe
  2. Type cd ..
  3. Type tree to look at the folder hierarchy structure
  4. Delete all files that are in the Documents directory including those in folderA, and FolderB.

Type  del *.* /s

  1. Verify the files were deleted type the following commands

cd folderA


cd ..

cd FolderB


cd ..

  1. Remove/delete the folder in the Documents folder. Type the following commands

rd folderA

rd folder

rd folderC

  1. Verify every has been deleted from the Documents folder. Type dir


That is the end of this lab


Kindly Leave Comments and Feedback in the comments Area

Link to Windows Commands: