Sort Messy Folders and a Year of Receipts with Claude

A safe way to let Claude organize your files: plan first, keep a move log, never delete, and turn a folder of receipts into a checked spreadsheet

Every messy Downloads folder started with a good folder structure that nobody maintained. The problem was never the structure. It was that sorting files by hand is boring, and boring work gets skipped. Claude can open files, read what is inside them and move them, which means the boring part is finally something you can hand off.

The catch is that moving thousands of files is easy to do badly. Here is how I set it up so the result is useful and nothing gets lost, plus a version for the folder everyone dreads: a year of receipts.

Choose where Claude works

You need a version of Claude that can touch files on your computer. The regular chat in the browser cannot.

  • Claude Code, included with paid Claude plans, runs in the terminal or inside VS Code. Open it in the folder you want to sort. Setup is in the quickstart.
  • Cowork, in the Claude desktop app, if you would rather not open a terminal. You pick a folder and describe the task. Anthropic has a short example of this exact use case.

The prompts below work in both.

Safety before speed

Three habits make this boring in the good way.

  1. Work on a copy the first time. Duplicate the folder and let Claude sort the duplicate. Once you like the result, run it on the real one.
  2. Plan first. In Claude Code, press Shift+Tab until you see plan mode, or start your message with /plan. Claude reads and proposes, but does not change anything until you approve.
  3. Keep a move log. Claude Code's rewind only restores edits made with its own file editing tools. Files moved with shell commands like mv are not tracked, so a log is your undo button.

Step 1: look before you sort

Look through every file in this folder, including subfolders. Do not move,
rename or delete anything yet. Tell me: how many files by type, the rough
date range, and the 5 to 8 groups you see based on what the files actually
contain (open them, do not guess from names alone). Point out anything that
looks sensitive, like IDs, contracts or bank statements.

This step matters more than it looks. Sorting by file type (all PDFs together, all images together) is the lazy answer and it never helps you find anything. Grouping by what a file is for, like a project, a client, taxes or travel, is what makes a folder usable a year later.

Step 2: agree on the structure

Propose a folder structure based on those groups. Keep it to two levels deep
at most. Use this naming rule for files: YYYY-MM-DD short-description, lower
case, no spaces. Show me the structure and 10 example moves with old path
and new path. Wait for my OK.

Push back here. If a group only has three files, merge it. If a name will not make sense to you in a year, change it. This is the only part that needs your judgment.

Step 3: move, with a receipt

Go ahead with the structure we agreed. Before moving anything, write
move-log.csv with columns old_path, new_path. Then write undo-moves.sh that
reverses every move in the log. Then do the moves. Never delete anything.
Anything you are not sure about goes into a folder called _review.
When you finish, count files before and after and confirm they match.

The count at the end is the check I care about most. If the before and after numbers differ, something was skipped or overwritten, and you want to know now.

Step 4: duplicates, reported not removed

Find exact duplicates by content hash (shasum -a 256 on macOS). Also list
likely duplicates, like report.pdf and report (1).pdf with the same size.
Do not delete. Give me a list grouped by duplicate set, with the one you
would keep marked.

You delete. Claude reports. That split is worth keeping even when you trust the result.

The receipts version

Receipts are the same problem with numbers attached, and numbers need stricter rules. Put every receipt, whether it is a phone photo, a PDF from email or a screenshot, into one folder called receipts and run this from the folder above it:

Read every file in ./receipts and build receipts.csv with columns: date
(YYYY-MM-DD), merchant, amount, currency, tax_shown, category, source_file,
confidence (high, medium, low), notes.

Rules:
1. Never guess a number. If anything is unreadable, write UNREADABLE and set
   confidence to low.
2. Record tax only if it is printed. Never calculate it.
3. Keep the original currency. Do not convert.
4. Convert HEIC photos to JPEG copies first (sips on macOS). Never modify
   the originals.
5. Work in batches of 20 and save after each batch.

Then write summary.md with totals by month and category, possible
duplicates side by side, months with no receipts, and a review list of
every low confidence row. Finally, check that rows plus skipped files equal
the total file count.

The two lines that do the heavy lifting are "never guess a number" and the final count. A blank cell you fix in two minutes is far better than a confident wrong amount that ends up in your accounts. This organizes records. It is not tax advice, so decide what counts as a business expense with your accountant.

If you would rather capture receipts on your phone as they happen, I also built an iPhone app for receipts and invoices, Reshito.

Keep it tidy without thinking

Save your rules once and reuse them. Claude Code reads a file called CLAUDE.md in the folder where it starts, so put your structure, naming rule and the "never delete, never guess" lines in there. After that, the monthly run is one sentence:

Sort the new files in ./inbox using the rules in CLAUDE.md, append to the
move log, and tell me what landed in _review.

Start with your Downloads folder on a copy, today. Once you see the log and the matching count, you will trust it with the folders that actually matter.

More in Everyday

← All guides