6.1.5.4 Lab - Common Windows CLI Commands
6.1.5.4 Lab - Common Windows CLI Commands
Introduction
In this lab, you will use CLI commands to manage files and folders in Windows.
Recommended Equipment
• A computer running Windows
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 1 of 9
Lab - Common Windows CLI Commands
Using the information displayed by the help command, explain the functions of the following commands:
Command Function
CD
CHKDSK
COPY
DEL
DIR
DISKPART
EXIT
FORMAT
GPRESULT
MD
TASKLIST
RD
ROBOCOPY
SHUTDOWN
XCOPY
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 2 of 9
Lab - Common Windows CLI Commands
b. Type md /? at the prompt to display additional information and switches that can be used with this
command.
b. Type dir at the command prompt to list the files and folders that are in the current folder.
c. In the current directory, use the md command to create three new folders: ITEfolder1, ITEfolder2, and
ITEfolder3. Type md ITEfolder1 and press Enter. Create ITEfolder2 and ITEfolder3.
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 3 of 9
Lab - Common Windows CLI Commands
e. Type cd ITEfolder3 at the command prompt and press Enter. Which folder are you in now?
f. Within the ITEfolder3 folder, create a folder named ITEfolder4. Use the dir command to verify the folder
creation.
g. Type cd .. to change the current directory. Each .. is a shortcut to move up one level in the directory tree.
After issuing the cd .. command, what is your directory now?
What would be the current directory if you issue this command at C:\Users\ITEfolder3?
c. Use the dir command to verify the files are in the ITEfolder1 folder.
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 4 of 9
Lab - Common Windows CLI Commands
b. Type dir at the prompt to verify that doc2.txt is no longer in the current directory.
c. Type cd C:\Users\ITEUser\ITEfolder2 to change the directory to ITEfolder2. Type dir at the prompt to
verify doc2.txt has been moved.
d. Type copy doc2.txt doc2_copy.txt to create a copy of doc2.txt. Type dir at the prompt to verify a copy
of the file has been created.
e. Now use the move command to move doc2_copy.txt to ITEfolder1. Type move doc2_copy.txt
..\ITEfolder1.
f. A copy of doc2.txt can be created and renamed with the copy command. Type copy
doc2.txt ..\ITEfolder1\doc2_new.txt at the prompt.
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 5 of 9
Lab - Common Windows CLI Commands
g. Type dir ..\ITEfolder1 to view the content in ITEfolder1 without leaving the current directory.
j. Now delete doc2_copy.txt from the ITEfolder1 directory. Type del doc2_copy.txt. Use the dir
command to verify the file deletion.
b. Verify the content in ITEfolder1. Move all the files in this folder to ITEfolder2. Type move doc*.txt
..\ITEfolder2 to move the files.
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 6 of 9
Lab - Common Windows CLI Commands
c. Type xcopy ..\ITEfolder3 . at the prompt to copy the content of ITEfolder3 to ITEfolder1. Note the . at
the end of the command. It is a shortcut for the current directory.
d. At the prompt, type dir to display the content of ITEfolder1. Only the files in the ITEfolder3 were copied
into ITEfolder1. The directory ITEfolder4 was not copied into ITEfolder3.
e. Use help xcopy to determine which switch would allow the xcopy command to copy all the files and
directories.
f. Because ITEfolder4 is an empty folder, /E is needed to copy all the content of ITEfolder3 and the empty
subfolder.
Type xcopy /E ..\ITEfolder3 . at the prompt to copy the files. When prompted, type a to allow overwriting
the existing files.
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 7 of 9
Lab - Common Windows CLI Commands
e. Use rd /? command to determine the switch that allows the deletion of a non-empty directory.
f. Type rd /S ITEfolder2 to delete this folder. When prompted, type y to delete the directory. Use dir to
verify that ITEfolder2 was deleted.
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 8 of 9
Lab - Common Windows CLI Commands
Reflection
What are the advantages of using CLI vs. GUI?
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 9 of 9