WINDOWS COMMAND PROMPT

LESSON – WILDCARDS & RENAMING

 

separator-blank.png

 

INDIVIDUAL WORK

 

SETUP

 

From the previous lesson, you should already have a folder called cmdWork

 

From this lesson’s group work, you should already have a folder inside cmdWork called Lesson3Work.

 

QUESTION 01 - PATTERNS

 

·       Go to the Lesson03Work/Wildcard directory.

 

a)    Use the dir command with wildcards to display all files that start with a.

 

          Command used: ________________________

 

b)    Use the dir command with wildcards to display all jpg files.

 

          Command used: ________________________

c)    Use the dir command with wildcards to display all files that contain one letter (any extension).

 

          Command used: ________________________

d)    Use the dir command with wildcards to display all files that contain the letter p as the second letter in the name.

 

          Command used: ________________________

e)    Use the dir command with wildcards to display all files that start with s and have jpg extension.

 

          Command used: ________________________

 

f)      Use the dir command with wildcards to display all files that contain exactly 2 letters (any extension).

          Command used: ________________________

 

g)    Use the dir command with wildcards to display files that have the 8th letter of the file equal to n.

          Command used: ________________________

 

QUESTION 02 – RENAMING

 

·       Go to the directory LessonWork03/SMB.

·       Use dir to see the contents of the directory.  Notice that each file / directory has a typo in it.

·       Rename each item to its correct name.

For example, use:

        ren murio.txt mario.txt

 

·       Once you are done fixing all the typos, rename all of the files this directory so that they have the .dat extension instead of the .txt extension.  All files should be renamed using a single command.  (So one of the files should be named mario.dat.)

 

separator-blank.png