ποΈ Data Organizer
A smart and minimal Python script that keeps your folders clean and organized automatically. It scans any directory and sorts files into categorized subfolders based on their type or extension.
π Overview
Tired of a messy Downloads or Desktop folder full of mixed files? This script automatically:
Detects file types
Creates folders like Images, Videos, Documents, etc.
Moves files into their correct place
Handles duplicates safely
Works on any OS (Linux, macOS, Windows)
No dependencies, no setup β pure Python automation.
βοΈ Features
β Sorts files by type (image, video, audio, document, etc.) β Automatically creates destination folders β Skips folders (wonβt move your directories) β Works on multiple directories in one session β Handles duplicate files gracefully β Uses only Pythonβs built-in modules (os, shutil) β Safe to run multiple times
π§© Supported File Types Category Extensions Images .jpg, .jpeg, .png, .gif, .bmp, .tiff, .webp, .svg Videos .mp4, .avi, .mov, .mkv, .flv, .wmv Audio .mp3, .wav, .ogg, .flac, .aac Documents .pdf, .docx, .doc, .txt, .pptx, .xlsx, .csv Archives .zip, .rar, .tar, .gz Executables / Installers .exe, .msi Disk Images .iso Other Files with unknown extensions π§ Example Before: Downloads/ βββ photo.jpg βββ resume.docx βββ video.mp4 βββ archive.zip βββ song.mp3
After running the script: Downloads/ βββ Images/ β βββ photo.jpg βββ Documents/ β βββ resume.docx βββ Videos/ β βββ video.mp4 βββ Archives/ β βββ archive.zip βββ Audio/ β βββ song.mp3
π§° Requirements
β Works out of the box with Python 3+ No need to install anything extra β it only uses:
import os import shutil
π» How to Run
Clone or download this repository:
git clone https://github.com/linuxcoding-ADAM/data_organizer.git cd data_organizer
Run the script:
python3 data_organizer.py
or (depending on your system)
python data_organizer.py
Follow the on-screen instructions:
Enter a directory path (like /home/adam/Downloads)
Add multiple paths if you want
Press Enter on an empty line to start organizing
π§Ύ Example Output Please enter a directory path to organize (or press Enter to finish): /home/adam/Downloads Do you want to add another directory? (y/n): n
Starting organization for 1 directory... Processing directory: /home/adam/Downloads Created directory: /home/adam/Downloads/Images Moved 'photo.jpg' to 'Images' Moved 'resume.docx' to 'Documents' Moved 'video.mp4' to 'Videos' Moved 'archive.zip' to 'Archives' Moved 'song.mp3' to 'Audio' All tasks are complete.
The script moves files, not copies them (faster, no duplicates).
If a file already exists in the destination folder, it skips it.
You can run it safely multiple times β it wonβt break your folders.
Test on a small directory first if youβre curious how it behaves.