Back to Blog
Arnošt Havelka

Practice: File Organization

Practice organizing files using mkdir and mv commands.

Start Interactive Lesson
Practice: File Organization

Practice: File Organization

Time to use your new skills! Organize a messy directory by creating folders and moving files into them.

The Scenario

Your Downloads folder is a mess. Files are scattered everywhere. Let's organize them by type.

Usage:mkdirDocumentsImagesArchives
mkdir Documents Images Archives
Create three folders for organization.

Step 1: Create Folders

Create three new directories to organize your files.

Command Prompt
/home/user/Downloads report.pdf photo.jpg backup.zip letter.txt
C:\Users\User>pwd ls

Step 2: Organize Files

Now move each file into its appropriate folder.

Usage:mvfile.txtDocuments/
Documents/
Move text files to Documents folder.
Images/
Move image files to Images folder.
Archives/
Move compressed files to Archives folder.

Organize systematically:

Command Prompt
Archives Documents Images letter.txt photo.jpg report.pdf backup.zip
C:\Users\User>ls

Verify Your Organization

Check inside each folder to confirm everything is in place.

Command Prompt
C:\Users\User>ls Documents/ ls Images/ ls Archives/

Key Takeaways


Knowledge Check

1 / 3

What's the first step in organizing a messy directory?

References

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

Up Next

Searching Text with grep

Master grep to search for patterns in files.