Skip to content
MIYA·AI·LAB / generative-AI test logs LLM · Claude Code · MLX · Ollama
AI MiyaAILab_
  • // Lab
  • // all logs
JA / EN
← Miya-Gadget
Generative AI PC

Automate File Organization with Claude Code: Tidy Up Messy Folders in Seconds

2025年11月21日 · Shichinomiya
Automate File Organization with Claude Code: Tidy Up Messy Folders in Seconds

Table of Contents

Toggle

Automate File Organization with Claude Code: Tidy Up Messy Folders in Seconds

So far in this series, I’ve built everything from a weather forecast app and beyond. This time, I’m tackling file organization automation. I built a tool that automatically sorts the pile of files in your Downloads folder by type.

What We’re Building: An Automatic File Organizer

Key Features

  • Sort by file extension: Automatically organize images, videos, documents, and more into folders
  • Date-based organization: Create folders based on creation or modification dates
  • Duplicate file detection: Find and remove identical files
  • Batch file renaming: Add sequential numbers or dates for organized naming
  • Scheduled execution: Set it to run automatically on a schedule

Claude Code - File organizer tool creation request

Chatting with Claude Code

I asked Claude Code: “I want to automatically organize files in my Downloads folder. Please sort them into folders by file extension.”

Claude Code proposed an implementation using Python’s pathlib and shutil libraries:

  • Get each file’s extension
  • Create the corresponding folder
  • Move (or copy) files
  • Display a processing report

Implementation Walkthrough

1. Select the Target Folder

Specify the folder you want to organize.

Folder selection screen

2. Run the Auto-Sort

The tool analyzes file extensions and moves files to the appropriate folders.

File organization in progress

Sorting categories:

  • Image files (.jpg, .png, .gif, etc.)
  • Video files (.mp4, .avi, .mov, etc.)
  • Document files (.pdf, .docx, .txt, etc.)
  • Music files (.mp3, .wav, .flac, etc.)
  • Archive files (.zip, .rar, .7z, etc.)
  • Other

3. View Results

The tool displays the number of organized files and a breakdown by category.

Organization results

4. Detect Duplicate Files

The tool calculates file hashes to identify files with identical content.

Duplicate file detection

Experiencing the Power of Automation

Compared to Manual Work

Manually sorting 100+ files would take over 30 minutes, but this tool finishes in just seconds.

Easy to Customize

You can add your own sorting rules through conversation with Claude Code:

  • Sort by specific keywords in file names
  • Sort by file size
  • Sort by creator

My Impressions

What Worked Well

  • Massive time savings: Organization takes virtually zero seconds
  • No mistakes: Manual sorting is error-prone; automation is reliable
  • Scheduled runs keep things tidy: Files get sorted before they pile up
  • Duplicate reduction: Saves storage space

Room for Improvement

  • Machine learning for content recognition
  • Cloud storage integration
  • GUI-based operation
  • Undo functionality

Conclusion

Using Claude Code, I was able to build a file organization automation tool.

Automating repetitive daily tasks can save a tremendous amount of time. Even as a programming beginner, working through the process conversationally with Claude Code made it possible to create a genuinely practical automation tool.

Next time, I plan to take on even more advanced automation challenges.

See you in the next article!

You might also like

More generative-AI logs from the lab.

  • Tesla V100 32GB in 2026: Local LLM Benchmark with Qwen 3.6 — 98.8 tok/s on MoE 35B, 1.6x Faster Than M1 Max (Used, ≈$900)
  • Auto-Generate PDF Reports with Claude Code: From Raw Data to Polished Documents
  • Building a Full-Stack Blog System with Claude Code: Applying Everything I Learned
  • Darkbloom Review: Can a Mac Really Earn Money Serving AI? (I Tested It for a Day)
Previous Article Building a Weather Forecast App with Claude Code and API Integration
Next Article Auto-Generate PDF Reports with Claude Code: From Raw Data to Polished Documents

Related Posts

Qwen 3.6 on a Mac, Measured: on an M1 Max 64GB, the MoE 35B ran 3.7x faster than the 27B

Qwen 3.6 on a Mac, Measured: on an M1 Max 64GB, the MoE 35B ran 3.7x faster than the 27B

Building a Weather Forecast App with Claude Code and API Integration

Building a Weather Forecast App with Claude Code and API Integration

Can you really cut your AI API bill? I deployed the context-compression tool “Headroom” and measured it

Can you really cut your AI API bill? I deployed the context-compression tool “Headroom” and measured it

Can GTX 1080 Ti Run Modern AI? Qwen 3.5 Local LLM Benchmark Results

Can GTX 1080 Ti Run Modern AI? Qwen 3.5 Local LLM Benchmark Results

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Shichinomiya

Shichinomiya

A blogger who loves PC and gadgets. Sharing daily discoveries.

@shichinomiya_s

Popular Posts

  • Does the trending Claude Code skill “ADHD” actually make the agent smarter? A measured duel vs single-shot
  • Auto-Generate PDF Reports with Claude Code: From Raw Data to Polished Documents
  • Build a Budget Tracker App with Claude Code: Data Visualization Made Easy
  • Can GTX 1080 Ti Run Modern AI? Qwen 3.5 Local LLM Benchmark Results
  • Building a Full-Stack Blog System with Claude Code: Applying Everything I Learned

Categories

  • Announcements
  • Cars
  • Cycling
  • Gadgets
  • Generative AI
  • Home Appliances
  • Internet Service
  • Outings
  • Overseas Shopping
  • PC
  • Rental Servers & VPS
  • Travel

MiyaAILab

A hands-on lab for generative AI — new models, tools, and services tested for real, from benchmarks to everyday usefulness.

Lab

  • AI Lab トップ
  • 生成AI 全記事
  • ← Miya-Gadget 本体

Latest

  • Dual Tesla V100 SXM2 on a Single PCIe Slot: 64GB VRAM & 300 GB/s NVLink Tested — Is This $700 Setup Worth It?
  • Modded RTX 4080 32GB Benchmarked: Qwen3.8-27B at 262K Context, 125B MoE, and MiniMax H3 Video — What 32GB Actually Delivers
  • Tesla V100 32GB Runs Qwen3.8-27B: 131k Context on a Single Card — Measured Benchmark
  • Tesla V100 32GB in 2026: Local LLM Benchmark with Qwen 3.6 — 98.8 tok/s on MoE 35B, 1.6x Faster Than M1 Max (Used, ≈$900)
© 2026 Miya AI Lab — a section of Miya-Gadget. miyagadget.page