Are you still doing repetitive tasks manually?
It’s time to automate like a boss. 🤖💡
These Python scripts are small, powerful, and designed to save your time and energy—whether you're a developer, student, freelancer, or just someone who uses a computer daily.
📁 1. Bulk Rename Files in a Folder
import os
for count, filename in enumerate(os.listdir("my_folder")):
dst = f"file_{count}.txt"
os.rename(f"my_folder/{filename}", f"my_folder/{dst}")
✔️ Renames all files to file_0.txt, file_1.txt, ...
📚 2. Merge All PDFs in a Folder
import PyPDF2
import os
merger = PyPDF2.PdfMerger()
for pdf in os.listdir():
if pdf.endswith(".pdf"):
merger.append(pdf)
merger.write("merged.pdf")
merger.close()
✔️ No more dragging PDFs into online tools. Done locally in seconds.
📝 3. Extract Text from Any PDF
from PyPDF2 import PdfReader
reader = PdfReader("example.pdf")
text = ""
for page in reader.pages:
text += page.extract_text()
print(text)
✔️ Instantly make any PDF copy-paste friendly.
🖼️ 4. Resize All Images in a Folder.
from PIL import Image
import os
for file in os.listdir("images"):
if file.endswith(".jpg"):
img = Image.open(f"images/{file}")
img = img.resize((800, 800))
img.save(f"images/resized_{file}")
✔️ Resize Instagram photos, memes, or assets in bulk.
💡 5. Quick Notes to Markdown File.
note = input("What’s on your mind? ")
with open("notes.md", "a") as f:
f.write(f"- {note}\n")
✔️ Make your own fast note-taker from the terminal.
⌛ 6. Pomodoro Timer (25/5 Focus Cycle).
import time
def timer(minutes):
print(f"⏳ Focus for {minutes} minutes!")
time.sleep(minutes * 60)
print("✅ Time’s up!")
timer(25)
timer(5)
✔️ Boost productivity with a custom Pomodoro timer.
🔐 7. Generate Strong Random Passwords.
import random
import string
password = ''.join(random.choices(string.ascii_letters + string.digits, k=12))
print("🔐", password)
✔️ Never reuse a weak password again.
💬 8. Summarize Any Text in 3 Sentences.
import nltk
nltk.download('punkt')
from nltk.tokenize import sent_tokenize
text = input("Paste your text:\n")
sentences = sent_tokenize(text)
print("\n".join(sentences[:3]))
✔️ Quick way to get the gist of long emails or articles.
🧹 9. Clean Up Downloads Folder.
import os
import shutil
downloads = "C:/Users/YourName/Downloads"
for file in os.listdir(downloads):
if file.endswith(".zip"):
shutil.move(f"{downloads}/{file}", f"{downloads}/Zips/{file}")
✔️ Automatically organizes downloaded files.
🧠 10. Daily Motivation Quote.
import requests
res = requests.get("https://zenquotes.io/api/random")
quote = res.json()[0]['q'] + " —" + res.json()[0]['a']
print(quote)
✔️ Start the day with wisdom right from your terminal.
⚡️ Bonus Tip: Turn These Into One-Click Apps
Use Streamlit to turn these scripts into apps with buttons and sliders—no frontend code needed!
🙌 Wrapping Up
Python isn’t just for AI or backend dev. It’s your personal time-saving assistant.
Save this post, try these scripts, and let me know which one was your favorite. Or better yet — comment with your own!
🧠 Want a Part 2 with 10 More Scripts?
💬 Drop a comment or hit ❤️ if you found this helpful!