A professional C++ command-line application for automatic file organization by type. Organizes cluttered directories into categorized subdirectories with full undo capabilities.
File Organizer scans a directory and automatically sorts files into predefined categories based on file extensions. The application provides safe file operations with complete undo functionality and session tracking.
- Automatic file categorization by extension
- Safe file operations with error handling
- Complete undo functionality with session tracking
- Cross-platform compatibility (Windows, Linux, macOS)
- Interactive and command-line modes
- Progress tracking and detailed logging
| Category | Extensions |
|---|---|
| Documents | .pdf, .doc, .docx, .txt, .rtf, .odt, .xls, .xlsx, .ppt, .pptx, .csv, .md |
| Images | .jpg, .jpeg, .png, .gif, .bmp, .tiff, .svg, .webp, .ico |
| Videos | .mp4, .avi, .mkv, .mov, .wmv, .flv, .webm, .m4v, .3gp |
| Audio | .mp3, .wav, .flac, .aac, .ogg, .wma, .m4a, .opus |
| Others | All other file types |
- C++ compiler with C++17 support (g++, clang++, MSVC)
- Windows, Linux, or macOS
If you need help setting up a C++ compiler and development environment:
- Official VS Code C++ Documentation: https://code.visualstudio.com/docs/languages/cpp
- Video Tutorial: How to Install C++ Compiler and Run C++ Programs
-
Clone the repository:
git clone https://github.com/oladosuabayomi/FileOrganizer.git
After cloning, navigate to the project directory:
cd FileOrganizer -
Build the project:
Windows (Command Prompt):
./build.bat
Linux/macOS/Windows (Git Bash):
chmod +x run.sh ./run.sh
-
The executable will be created in the
build/directory:- Windows:
build/FileOrganizer.exe - Linux/macOS:
build/FileOrganizer
- Windows:
For the easiest experience, use the modern web interface:
Windows:
launch-web.batLinux/macOS:
cd web
./start.shThe web interface provides:
- Beautiful, modern UI that works on all devices
- Real-time progress tracking and visual feedback
- File preview before organization
- Organization history and selective undo
- No command-line knowledge required
Visit http://localhost:3000 after starting the server.
For detailed web interface documentation, see web/README.md
# Show help
./build/FileOrganizer --help # Linux/macOS
./build/FileOrganizer.exe --help # Windows# Interactive mode (recommended for beginners)
./build/FileOrganizer --interactive
# List files and their categories (preview mode)
./build/FileOrganizer --list "/path/to/folder"# Organize files
./build/FileOrganizer --organize "/path/to/folder"# Undo last organization
./build/FileOrganizer --undo "/path/to/folder"# Undo specific session
./build/FileOrganizer --undo "/path/to/folder" 20250711_143022# Show organization history
./build/FileOrganizer --history "/path/to/folder"# Organize Downloads folder
./build/FileOrganizer --organize ~/Downloads# Preview organization without moving files
./build/FileOrganizer --list ~/Downloads# Interactive mode for guided operation
./build/FileOrganizer --interactive# Undo the last organization in Downloads
./build/FileOrganizer --undo ~/DownloadsUse the provided build scripts for your platform:
- Windows:
build.bat - Linux/macOS/Git Bash:
./run.sh
For advanced users who prefer manual compilation:
# Create build directory
mkdir -p build# Windows
g++ -std=c++17 -static-libgcc -static-libstdc++ -o build/FileOrganizer.exe src/fileorganizer.cpp# Linux/macOS
g++ -std=c++17 -static-libgcc -static-libstdc++ -O2 -Wall -Wextra -o build/FileOrganizer src/fileorganizer.cppThis project is licensed under the MIT License. See the LICENSE file for details.
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
For issues and questions, please create an issue on the GitHub repository.
For detailed documentation, please refer to the DOCUMENTATION.md file. This file contains comprehensive guides, examples, and API references to help you understand and use the File Organizer effectively.