Back to Blog
Arnošt Havelka

Revision 1: DIR & ECHO

Practice what you've learned with DIR and ECHO challenges.

Start Interactive Lesson
Revision 1: DIR & ECHO

Revision 1: DIR & ECHO

Time to put your knowledge to the test! In this revision lesson, you'll practice combining the dir and echo commands you've already learned. These two commands are the foundation of working in the Windows terminal — listing files and printing output. Let's see how well you remember them!

Usage:dir
[options]
| echo
[message]
/w
Displays the directory listing in wide format.
/p
Pauses the listing after each screen of output.
/a
Shows files with specific attributes, including hidden files.
/s
Lists files in the current directory and all subdirectories.

Challenge 1: List and Announce

Use dir to list the current folder, then use echo to print a completion message.

Command Prompt
C:\Users\User>dir /w
Command Prompt
C:\Users\User>echo Listing complete!

Challenge 2: Create a Log Entry

Use echo to write a message to a file, then use dir to confirm it was created.

Command Prompt
C:\Users\User>echo Log started > activity.log

Knowledge Check

1 / 3

Which command lists files in a directory?

References

These Microsoft Learn and Windows documentation links provide authoritative details for the commands used in this article.

Up Next

Wildcards

Magic characters for file matching.