Skip to content

lunagray932-ctrl/file-organizer-renamer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📁 File Organizer + Renamer

The Ultimate File Organization Tool for Windows - A powerful, feature-rich desktop application that brings order to digital chaos.

Python Platform License Status Downloads

Download Latest Release | Star This Project


Recent Updates (Feb 7, 2026)

Security & Quality Improvements - Thanks to @tomysshadow for the detailed code review (#1):

  • Fixed TOCTOU race condition in file operations (prevents data loss)
  • Replaced deprecated VBScript launcher with .pyw file (Windows 2027-ready)
  • Improved path validation using os.path.samefile() for better reliability
  • Code quality improvements with defaultdict and cleaner logic

See commits 523502a and 6a10a70 for details.


Overview

File Organizer + Renamer is a professional-grade desktop application designed to solve the universal problem of messy files. Whether you have thousands of photos scattered across your PC or a Downloads folder that's become a digital junkyard, this tool brings everything into perfect order automatically.

Built with a modern dark-themed GUI, intelligent duplicate detection, and safety features that prevent data loss, it's the file organizer you wish Windows had built-in.


Demo

File Organizer Demo

Automated file organization in action

Video Demo

20260201_235634_Export.MP4

See the file organizer collecting scattered videos into organized folders


Features

Two Powerful Modes

Mode 1: Find Scattered Files

Hunt down files across your entire PC and collect them into one organized location.

  • Smart Scanning: Searches Desktop, Downloads, Documents, Videos, Music folders
  • System Protection: Automatically skips Windows, Program Files, and AppData (safety first!)
  • Intelligent Organization: Groups files by type (images/png/, videos/mp4/, etc.)
  • Zero Data Loss: Copies files instead of moving them (originals stay safe)

Mode 2: Organize Folder

Take any messy folder and transform it into a perfectly organized structure.

  • Recursive Scanning: Finds files in nested subfolders
  • Category Folders: Creates images/, videos/, documents/, etc.
  • Sub-Folder Organization: Further organizes by extension (images/png/, images/jpg/)
  • Smart Cleanup: Removes empty folders after organizing

Advanced Features

Duplicate Detection

Never waste space on identical files again.

  • SHA256 Hash Comparison: Detects true duplicates by analyzing file content (not just names)
  • Visual Review: Opens duplicate files side-by-side in File Explorer for easy comparison
  • Smart Keep Logic: Automatically selects the newest file to keep
  • Batch Management: Delete duplicates in groups or individually
  • Per-Group Selection: "Select All Here" buttons for quick decisions
  • Recycle Bin Safety: All deletions go to Recycle Bin (fully reversible)

Date-Based Organization

Organize files by when they were created or taken.

  • EXIF Date Support: Reads creation dates from photo metadata (requires Pillow)
  • Multiple Styles:
    • year_month → 2024/2024-03/
    • year_only → 2024/
    • year_month_simple → 2024-03/
  • Fallback System: Uses file modification date if EXIF unavailable

Size Filtering

Control which files get organized based on size.

  • Minimum Size: Skip tiny files like thumbnails and cache (default: 50 KB for Find mode)
  • Maximum Size: Filter out large files (0 = no limit)
  • Smart Defaults: Find mode filters thumbnails automatically, Organize mode includes all files

Performance & UX

Built for speed and user experience.

  • Background Threading: GUI never freezes, even when processing thousands of files
  • Live Progress Bars: Visual feedback during long operations (centered, not hidden)
  • Full Screen Results Viewer: See operations in detail with auto-updating live view
  • Perfect Scroll Behavior: Scroll position preserved during auto-updates
  • Mousewheel Support: Natural scrolling throughout the entire interface

Safety & Recovery

Your files are protected at every step.

  • Preview Mode: See exactly what will happen before committing
  • No Overwrite: Files are renamed (photo.jpg → photo_1.jpg) instead of replaced
  • Full Undo System: JSON logs track every operation for complete reversal
  • Operation Logs: Every action saved in logs/ folder with timestamps
  • Error Handling: Failed operations are logged, other files continue processing

User Interface

Modern Dark GitHub Theme

  • Clean, minimal design that's easy on the eyes
  • Professional color scheme (#1e1e1e backgrounds, #238636 accents)
  • Responsive layout that works on any screen size
  • Intuitive button placement (no hunting for features)
  • Help system built-in with comprehensive documentation

Smart Accessibility

  • Large, readable fonts (Segoe UI)
  • Color-coded actions (green = safe, red = delete, blue = info)
  • Clear visual hierarchy
  • Prominent buttons for important actions
  • Instruction boxes for complex features (Duplicate Manager)

Installation

Step 1: Requirements

  • Operating System: Windows 10 or later
  • Python: Version 3.8 or higher (Download here)
  • Dependencies: None required! (Pillow is optional for EXIF date reading)

Step 2: Download

# Clone this repository
git clone https://github.com/lunagray932-ctrl/file-organizer-renamer.git

# Or download as ZIP and extract

Step 3: Setup

# Navigate to the folder
cd file-organizer-renamer

# Run the one-time setup
python setup.py

The setup wizard will:

  • Check for optional dependencies
  • Offer to install Pillow (for EXIF date reading)
  • Ask if you want a desktop shortcut
  • Create the launcher

You only run setup.py once!

Step 4: Launch

After setup, launch the app by:

  • Double-clicking the desktop shortcut (if you created one)
  • OR double-clicking gui_unified.pyw in the folder

Usage

Quick Start: Organize Your Downloads Folder

  1. Launch the app
  2. Click "Organize Folder" (right tab)
  3. Click "Browse" and select your Downloads folder
  4. Leave default options checked:
    • Create sub-folders by file type
    • Scan all subfolders recursively
    • Delete empty folders after organizing
  5. Click "Preview" to see what will happen (optional but recommended)
  6. Click "Organize" to execute
  7. Watch as your Downloads folder transforms into organized categories!

Find Scattered Photos Across Your PC

  1. Click "Find Scattered Files" (left tab)
  2. Check "Images" (and any other file types)
  3. Click "Scan for Files" - wait for the scan to complete
  4. Review the results (shows count by category)
  5. Click "Browse" to choose where to collect them (e.g., C:\My Photos)
  6. Choose organization style:
    • By file type (recommended): images/png/, images/jpg/
    • By category only: images/, videos/
    • By source folder: from_desktop/, from_downloads/
  7. Click "Collect Files" - your files are now organized!

Managing Duplicates

  1. Enable "Find duplicate files" checkbox before organizing/scanning
  2. After scan completes, click "Duplicates" button
  3. Review duplicate groups:
    • Green "KEEP" box: Newest file (protected, can't delete)
    • Checkboxes: Older duplicates (safe to delete)
  4. Options:
    • "Visual Review": Opens files in Explorer for side-by-side comparison
    • "Select All Here": Check all duplicates in that group
    • "Select All" (bottom): Check all duplicates across all groups
    • "Select None": Uncheck everything
  5. Click "Delete Selected" - files go to Recycle Bin (reversible!)

Who Is This For?

Perfect for:

  • Digital Hoarders - Thousands of files, zero organization
  • Photographers - RAW files, JPEGs, and duplicates everywhere
  • Content Creators - Videos, projects, and assets scattered across drives
  • Students - Documents, PDFs, and screenshots in chaos
  • Anyone with a messy Downloads folder - We all have one
  • IT Professionals - Manage files for clients or organizations
  • Minimalists - Want a clean, organized digital life

Use Cases:

  • Organizing photo libraries (wedding photos, vacation albums, phone camera dumps)
  • Cleaning up Downloads folder weekly/monthly
  • Consolidating files before backing up to external drive
  • Finding and removing duplicate files to free up space
  • Organizing project files by date or type
  • Preparing files for archival or cloud upload
  • Cleaning up inherited hard drives or old computers

Supported File Formats (150+)

Images (30+ formats)

jpg, jpeg, png, gif, bmp, webp, svg, ico, tiff, tif, heic, heif, raw, cr2, nef, arw, dng, orf, rw2, pef, srw, raf, and more RAW camera formats

Videos (20+ formats)

mp4, avi, mkv, mov, wmv, flv, webm, m4v, mpg, mpeg, 3gp, ogv, vob, mts, m2ts, ts

Documents (25+ formats)

pdf, doc, docx, txt, rtf, odt, xls, xlsx, ods, ppt, pptx, odp, csv, xml, json, md, tex

Audio (15+ formats)

mp3, wav, flac, aac, ogg, m4a, wma, ape, opus, alac

Archives (10+ formats)

zip, rar, 7z, tar, gz, bz2, xz, iso

Code & Development (40+ formats)

py, js, html, css, java, cpp, c, h, cs, php, rb, go, rs, swift, kt, ts, jsx, vue, sh, bat, ps1, sql, and more

Other

exe, msi, dll, apk, dmg, pkg, deb, rpm, torrent, psd, ai, eps, sketch, fig, blend, max, fbx

Don't see your format? Edit config.py to add custom categories!


Technical Details

Architecture

File Organizer + Renamer/
├── gui_unified.py          # Main GUI application (1600+ lines)
├── organizer.py            # Core organization logic
├── collector.py            # PC-wide file scanning
├── duplicate_detector.py   # SHA256-based duplicate detection
├── date_organizer.py       # EXIF & file date handling
├── categorizer.py          # File type classification
├── logger.py               # Operation logging & undo system
├── renamer.py              # Safe file renaming logic
├── config.py               # File type definitions
├── main.py                 # CLI interface (legacy)
├── setup.py                # One-time setup wizard
├── gui_unified.pyw         # Main application (launches without console)
└── icon.ico                # Application icon

Technologies

  • Language: Python 3.8+
  • GUI Framework: tkinter (built-in, no installation needed)
  • Threading: Background operations prevent GUI freezing
  • Hashing: SHA256 for accurate duplicate detection
  • Optional: Pillow (for EXIF metadata reading)
  • Platform: Windows-optimized (Recycle Bin, shortcuts, file operations)

Performance

  • Scan Speed: ~2000-5000 files/second (depends on drive speed)
  • Memory: Minimal footprint, handles 100,000+ files
  • Threading: All long operations run in background threads
  • GUI Responsiveness: 60 FPS, never freezes

Safety Features

Data Protection

  1. No Deletion by Default: Files are moved/copied, never deleted (except in Duplicate Manager)
  2. Recycle Bin Integration: All deletions are reversible via Windows Recycle Bin
  3. No Overwrite: Files with same name get renamed (photo.jpg → photo_1.jpg → photo_2.jpg)
  4. System Folder Protection: Skips Windows/, Program Files/, AppData/
  5. Preview Mode: See changes before they happen
  6. Full Undo System: JSON logs allow complete reversal of operations

Error Handling

  • Files in use by other programs are skipped (logged)
  • Permission errors are handled gracefully
  • Failed operations don't stop the entire process
  • All errors are logged with timestamps and file paths

Documentation

  • Built-in Help: Click the red "Help" button in the app
  • FAQ.md: Frequently asked questions
  • QUICKSTART.md: 5-minute getting started guide
  • CHANGELOG.md: Version history and updates
  • ARCHITECTURE.md: Developer documentation

Contributing

Found a bug? Have a feature idea? Contributions are welcome!

  1. Fork this repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

TL;DR: Free to use, modify, and distribute. Just include the original license.


Acknowledgments

  • Icons: Emoji-based icons for universal compatibility
  • Design: Inspired by GitHub's dark theme
  • Duplicate Detection: SHA256 hashing algorithm
  • EXIF Reading: Pillow library (PIL Fork)
  • Community: Thanks to everyone who tested and provided feedback!

Privacy & Data Security

Your files, your computer, your privacy. Period.

This tool is built with privacy and security as core principles:

100% Offline Operation

  • No Internet Connection Required: Works completely offline
  • Zero Network Calls: No data sent anywhere, ever
  • No Telemetry: No usage statistics, crash reports, or analytics collected
  • No Cloud Services: All processing happens locally on your machine
  • No External APIs: No third-party services contacted

Your Data Stays Yours

  • No Data Collection: Your files are never seen, stored, or accessed by anyone
  • No User Tracking: No accounts, no logins, no tracking cookies
  • No File Uploads: Files never leave your computer
  • Open Source: All code is visible - inspect it yourself!

What Data Is Processed?

Locally Only:

  • File paths, names, sizes, and dates (read from your file system)
  • SHA256 hashes (for duplicate detection - computed locally)
  • EXIF metadata (if Pillow installed - read from image files locally)
  • Operation logs (saved locally in logs/ folder)

Never Collected or Transmitted:

  • File content is NEVER uploaded or sent anywhere
  • Your file organization preferences stay on your machine
  • No personal information, IP addresses, or device IDs collected

Security Features

  • System Folder Protection: Skips critical Windows folders automatically
  • No Admin Rights Required: Runs with user-level permissions only
  • Recycle Bin Integration: Deleted files can be restored from Windows Recycle Bin
  • Preview Before Changes: See exactly what will happen before committing
  • Full Audit Trail: All operations logged locally for transparency

Open Source Transparency

Every line of code is available for inspection:

  • Review the entire codebase on GitHub
  • No hidden binaries or compiled executables (Python source code only)
  • No obfuscation or encryption of code
  • Community-auditable for security concerns

GDPR & Privacy Compliance

Since this tool:

  • Operates entirely offline
  • Collects no personal data
  • Sends no data to external parties
  • Stores no data beyond your local machine

It inherently complies with GDPR, CCPA, and other privacy regulations.

Questions about privacy? Review the source code or open an issue on GitHub.


Support


Project Status

Current Version: 2.0.0 (Production Ready)

Recent Updates:

  • Unified GUI with dual modes
  • Advanced duplicate detection with visual review
  • Per-group selection in Duplicate Manager
  • Full screen results viewer with perfect scroll behavior
  • Background threading for all long operations
  • Desktop shortcut setup wizard
  • Window focus management for seamless workflow

Tested On:

  • Windows 11 (Primary)
  • Windows 10
  • Python 3.8, 3.9, 3.10, 3.11, 3.12, 3.14

Star This Project

If File Organizer + Renamer helped you tame your digital chaos, please consider giving it a star on GitHub! It helps others discover this tool and motivates continued development.


Made with ❤️ and Python

Bringing order to digital chaos, one file at a time.

⬆ Back to Top