•Arnošt Havelka
Practice: File Organization
Practice organizing files using mkdir and mv commands.
Start Interactive LessonPractice: 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
- Create organizational structure with
mkdir - Use
mvto relocate files by type - Organize proactively to save time finding things
- The same pattern works for any project
Knowledge Check
1 / 3What'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.