Claude Code for Non-Developers
Welcome to Claude Code

Exercise: Organize a messy folder

Put your new skills to work by using Claude Code to sort, rename, and organize a folder of mixed files

What you'll practice

This exercise uses everything from Module 1: the terminal, Claude Code, giving instructions, reviewing results, and the feedback loop.

You'll take a messy folder of 30 files and use Claude Code to clean it up. By the end, every file has a consistent name and sits in a logical subfolder.

Before you start

You need two things:

  1. Claude Code installed and working. If you haven't done this yet, go back to the installation page and follow the steps.
  2. A practice folder with messy files. You'll create this in the next section.

Tip: Use a practice folder, not a folder with real files you care about. Work with sample files so there's zero pressure.

Step 1: Create your practice folder

You're going to build a folder that looks like a real person's Desktop after six months of neglect. Inconsistent naming, mixed file types, no organization.

Open your terminal and create the folder:

Mac or Linux:

mkdir ~/Desktop/messy-folder
cd ~/Desktop/messy-folder

Windows (PowerShell):

mkdir ~\Desktop\messy-folder
cd ~\Desktop\messy-folder

Now start Claude Code in this folder:

claude

Then type this:

Create 30 sample files in this folder that simulate a messy work folder. Include a mix of:
- Word-style documents (.docx or .txt) with names like "Final Report v2.txt", "Meeting Notes march.txt", "Q3 review FINAL final.txt"
- Spreadsheets (.csv) with names like "sales_data (1).csv", "Budget 2025 NEW.csv"
- Images (.png or .jpg) with names like "IMG_4521.png", "screenshot 2024-03-15.png", "logo FINAL.jpg"
- A few random ones like "Untitled.txt", "Copy of Copy of proposal.txt", "temp.csv"

Make the names realistic and inconsistent — mixed capitalization, extra spaces, version numbers, duplicates. Put all 30 files in this folder with no subfolders.

Claude Code will create the files. Review what it made and check by asking:

List all the files you just created, grouped by type

You should see about 30 files with terrible, inconsistent names. That's what you want. Move on.

Step 2: Explore before you organize

Before touching anything, figure out what you're working with. Ask Claude Code:

Look at all the files in this folder. Tell me:
- How many files are there total?
- What file types are present?
- Are there any duplicates or near-duplicates?
- What naming patterns (or lack of patterns) do you see?

Read the summary carefully. Build this habit: understand before you act. On a real project, this step saves you from accidentally deleting something or organizing files in a way that makes no sense.

Step 3: Rename for consistency

The files have messy names. Ask Claude Code to fix that:

Rename all the files in this folder to use a consistent format:
- All lowercase
- Hyphens instead of spaces
- Remove words like "final", "copy of", "new", and version numbers like "v2"
- Keep the original meaning clear

Show me your plan before making any changes.

Claude Code will show you what it wants to rename each file to. This is the moment to review. Look through the proposed names:

  • Do the new names still make sense?
  • Did it keep the file extensions correct?
  • Did it remove the right words?

If something looks off, say so. For example: "Actually, keep the quarter numbers like Q3 in the names, those are meaningful."

When you're satisfied, approve the changes.

Heads up: Claude Code asks permission before renaming files. Approve each one so you can watch what's happening. If anything goes wrong, press Escape twice to rewind.

After the renaming is done, verify:

List all the files and show me the old name next to the new name

Check that nothing was lost. The file count should still be 30 (or whatever you started with).

Step 4: Organize into subfolders

Now that the names are clean, sort them into a structure. Ask Claude Code:

Organize these files into subfolders by type:
- documents/ for .txt and .docx files
- spreadsheets/ for .csv files
- images/ for .png and .jpg files
- other/ for anything that doesn't fit

Move each file into the right subfolder. Show me the plan first.

Review the plan. Does every file end up in a folder that makes sense? If you want a different structure, like organizing by topic instead of type, tell Claude Code. That's the feedback loop.

Approve the moves when you're ready, then verify:

Show me the final folder structure as a tree, with all files listed under their subfolder

You should see something like:

messy-folder/
├── documents/
│   ├── meeting-notes-march.txt
│   ├── quarterly-review.txt
│   └── ... (more .txt files)
├── spreadsheets/
│   ├── budget-2025.csv
│   ├── sales-data.csv
│   └── ... (more .csv files)
├── images/
│   ├── logo.jpg
│   ├── screenshot-2024-03-15.png
│   └── ... (more image files)
└── other/
    └── ... (anything that didn't fit)

Step 5: Verify nothing was lost

Last check. Ask Claude Code:

Count the total number of files across all subfolders. Is it the same number we started with? Are any files missing?

This confirms that every file was renamed and moved, with nothing deleted or duplicated.

Now open the folder in Finder (Mac) or File Explorer (Windows) and look at it yourself. You trust but verify. That habit will serve you throughout the entire course.

What you just did

In about 15 minutes, you navigated to a folder, explored its contents, renamed 30 files for consistency, sorted them into subfolders, and confirmed nothing was lost.

You did it by talking to Claude Code in plain English.

The pattern you used here (explore, instruct, review, verify) is the same one you'll use for data analysis in Module 3, automation in Module 4, and building tools in Module 5.

If something went wrong

If Claude Code renamed a file incorrectly, press Escape twice to rewind. Then give more specific instructions about what you want the name to be.

If a file ended up in the wrong subfolder, tell Claude Code to move it: "Move budget-2025.csv from documents/ to spreadsheets/."

If you want to start over, delete the practice folder and recreate it from Step 1. These are sample files. Nothing to lose.

If Claude Code gave an error, check that you're in the right folder (pwd to see where you are). If the error mentions permissions, make sure you approved when Claude Code asked.

Going further (optional)

If you finished quickly and want more practice:

  • Ask Claude Code to reorganize by topic instead of file type
  • Ask it to add the current date to every filename
  • Ask it to create a summary document listing all files and their locations
  • Try the same exercise with a real folder from your computer (copy it first)

What's next

That's Module 1 done. You can open a terminal, navigate to a folder, talk to Claude Code, and get real work done.

In Module 2, you'll learn how to communicate with Claude Code more effectively. How to describe what you want so it gets it right the first time, how to manage longer conversations, and how to set up a project so Claude Code understands your context from the start.

On this page