Java File Organizer
A simple and practical tool for automatically organizing files based on their type.
📌 Overview
This project is a small Java utility that scans a folder and automatically organizes its files into categorized subfolders such as Images, Documents, Videos, Music, Archives, and Code.
It was built as a practical hands‑on project to improve Java skills and work with file handling, basic I/O operations, and simple automation.
🚀 Features
- Scans any folder on your system
- Detects file types based on extension
- Automatically creates category folders
- Moves files into the correct folder
- Shows a clean summary of how many files were organized
- Works on Windows, Linux, and macOS
📂 Categories Files are grouped into:
- Images — png, jpg, jpeg, gif
- Documents — pdf, txt, docx
- Videos — mp4, mkv
- Music — mp3, wav
- Archives — zip, rar
- Code — java, py, js
- Others — anything not matching the above
🛠️ Technologies Used
- Java 17
- Basic File I/O
- Object‑oriented structure (4 clean classes)
📁 Project Structure
src/ ├── Main.java ├── FileOrganizer.java ├── FileTypeDetector.java └── FolderCreator.java
- Clone the repository
- Open the project in your IDE
- Set the folder path inside Main.java
- Run the program
Example:
java String path = "C:/Users/YourName/Downloads";
Java File Organizer v1.0
=========================================
Scanning folder: C:/Users/YourName/Downloads
Found 27 files. Organizing files...
✔ Images moved: 8 ✔ Documents moved: 6 ✔ Videos moved: 3 ✔ Music moved: 2 ✔ Archives moved: 1 ✔ Code files moved: 4
Done! All files organized successfully. `
🎯 Purpose of This Project
This project was created as a real, practical Java mini‑tool, not just a training exercise.
It helped me practice:
- Working with the File class
- Writing clean and readable code
- Structuring a small Java project
- Automating simple tasks
- Handling different file types
📌 Future Improvements
- Add support for more file types
- Add a GUI version
- Add logs for moved files
- Add undo/restore option
📬 Contact If you have suggestions or feedback, feel free to reach out.