1- ## 🗂️ File Organizer Script (Python)
1+ < h1 align = " center " > File Organizer Script (Python)</ h1 >
22
3- A simple Python script to automatically ** organize files** in a directory into subfolders based on their file types (extensions).
4- No more messy folders — everything is sorted neatly!
3+ <p align =" center " >
4+ A smart and lightweight <b >Python automation script</b > that automatically <b >organizes your files</b > into categorized subfolders based on their extensions.
5+ Say goodbye to messy "Downloads" folders — everything gets sorted neatly in seconds!
6+ </p >
57
6- ---
7-
8- ## ⚙️ How It Works
9- 1 . You input the folder path you want to organize.
10- 2 . The script scans all files in that directory (ignores subfolders).
11- 3 . It moves files into subfolders based on their extensions:
12- - ** Images** → ` .jpg, .jpeg, .png, .gif, .bmp, .tiff `
13- - ** Documents** → ` .pdf, .doc, .docx, .txt, .xls, .xlsx, .ppt, .pptx `
14- - ** Audio** → ` .mp3, .wav, .aac, .flac `
15- - ** Videos** → ` .mp4, .mov, .avi, .mkv `
16- - ** Archives** → ` .zip, .rar, .tar, .gz, .7z `
17- - ** Scripts** → ` .py, .js, .html, .css, .sh, .bat `
18- - ** Others** → Any file type not listed above
19- 4 . Files with unknown extensions are moved into an ** "Others"** folder.
8+ <p align =" center " >
9+ <a href =" https://www.python.org/ " ><img src =" https://img.shields.io/badge/Python-3.x-blue?style=for-the-badge&logo=python " ></a >
10+ <a href =" # " ><img src =" https://img.shields.io/badge/Automation-Script-green?style=for-the-badge&logo=autohotkey " ></a >
11+ <a href =" # " ><img src =" https://img.shields.io/badge/Platform-Windows%20|%20Linux%20|%20MacOS-orange?style=for-the-badge&logo=linux " ></a >
12+ <a href =" https://github.com/mantrapatil03/python-beginner-friendly-projects " ><img src =" https://img.shields.io/github/stars/mantrapatil03/python-beginner-friendly-projects?style=for-the-badge&logo=github " ></a >
13+ </p >
2014
2115---
2216
23- ## 🚀 Usage
17+ ## How It Works
2418
25- 1 . Clone this repository:
26- ``` bash
27- git clone https://github.com/yourusername/file-organizer.git
28- cd file-organizer
29-
30- 2.Run the script:
19+ 1️⃣ You input the ** folder path** you want to organize.
20+ 2️⃣ The script scans all files (ignoring subfolders).
21+ 3️⃣ It creates subfolders based on file types and ** moves** files accordingly:
3122
23+ | Category | File Extensions |
24+ | -----------| ----------------|
25+ | ** Images** | ` .jpg ` , ` .jpeg ` , ` .png ` , ` .gif ` , ` .bmp ` , ` .tiff ` |
26+ | ** Documents** | ` .pdf ` , ` .doc ` , ` .docx ` , ` .txt ` , ` .xls ` , ` .xlsx ` , ` .ppt ` , ` .pptx ` |
27+ | ** Audio** | ` .mp3 ` , ` .wav ` , ` .aac ` , ` .flac ` |
28+ | ** Videos** | ` .mp4 ` , ` .mov ` , ` .avi ` , ` .mkv ` |
29+ | ** Archives** | ` .zip ` , ` .rar ` , ` .tar ` , ` .gz ` , ` .7z ` |
30+ | ** Scripts** | ` .py ` , ` .js ` , ` .html ` , ` .css ` , ` .sh ` , ` .bat ` |
31+ | ** Others** | Any unrecognized file type |
3232
33- ` ` ` python file_organizer.py` ` `
33+ Files with unknown or uncommon extensions are moved into an ** “Others”** folder.
34+
35+ ---
3436
35- 3.Enter the folder path when prompted:
37+ ## Usage Guide
3638
39+ ### 1️⃣ Clone this repository:
40+ ``` bash
41+ git clone https://github.com/mantrapatil03/python-beginner-friendly-projects.git
42+ cd python-beginner-friendly-projects/file-organizer
43+ ```
44+ ### 2️⃣ Run the script:
45+ ```
46+ python file_organizer.py
47+ ```
48+ 3️⃣ Enter your target folder path:
3749```
3850Enter the path of the folder to organize: /home/user/Downloads
3951```
40- 4.Done ✅ Your files will be sorted into subfolders.
41-
42- ## 📌 Example
52+ ✅ Done! Your files will now be automatically categorized into subfolders.
4353
54+ ## Example Output
4455Before:
45- ```
46- javascript
56+ ``` javascript
4757Downloads/
4858├── photo1 .jpg
4959├── song .mp3
5060├── document .pdf
5161├── script .py
5262```
5363
54- After running the script:
55- ```
56- arduino
64+ After:
65+ ``` arduino
5766Downloads/
5867├── Images/
5968│ └── photo1.jpg
@@ -65,21 +74,18 @@ Downloads/
6574│ └── script.py
6675```
6776
68- ## **⚠️** **Notes**
69- ***This script moves files (not copies), so double-check before running it on important directories.***
70-
71- ***Make sure you have permissions to modify the target folder.***
77+ ### ⚠️ Notes
7278
73- ## 🔮 Future Improvements
74- Add support for more file categories (fonts, executables, etc.).
79+ - This script moves files (does not copy).
80+ - Make sure you have write permissions for the directory.
81+ - Always test on a small sample folder first to verify results.
7582
76- Option for copying instead of moving files.
77-
78- GUI version for easier use.
79-
80- ## 👨💻 Author
83+ ## Author
8184** Mantra Patil**
8285
83- Engineering Student | Python Developer (Learning) | Cybersecurity Enthusiast
86+ 💼 LinkedIn: https://www.linkedin.com/in/mantrapatil25
87+
88+ ✉️ techmantrapatil@gmail.com
8489
8590
91+ <h3 align =" center " >✨ If you found this useful, consider giving it a ⭐ on GitHub! ✨</h3 > <p align =" center " > <img src =" https://img.shields.io/badge/Stay%20Organized%20%26%20Keep%20Coding!-Python-blue?style=for-the-badge&logo=python " > </p >
0 commit comments