How to Automate Daily Tasks with Python — Save Hours Every Week
Have you ever wished your computer could do boring tasks for you — like renaming hundreds of files, sending regular emails, or organizing your folders automatically? Good news — Python can do that! In this article, we’ll explore how you can use Python to automate your daily routine and save hours every single week.
🚀 Why Python for Automation?
Python is one of the easiest and most powerful programming languages when it comes to automation. Its simple syntax and a huge collection of libraries make it perfect for automating repetitive tasks like:
- Renaming multiple files at once
- Sending emails automatically
- Copying or moving data between Excel sheets
- Web scraping — collecting data from websites
- Automating browser tasks (like filling out forms)
Let’s go step-by-step through some real-world automation examples you can try today.
📁 1. Automate File Renaming with Python
Imagine you have hundreds of images named IMG001, IMG002, IMG003... and you want to rename them to something meaningful like Vacation_1, Vacation_2.... Doing this manually would take hours — but Python can do it in seconds!
import os
folder_path = "C:/Users/YourName/Pictures/Vacation"
files = os.listdir(folder_path)
for count, filename in enumerate(files):
new_name = f"Vacation_{count+1}.jpg"
src = os.path.join(folder_path, filename)
dst = os.path.join(folder_path, new_name)
os.rename(src, dst)
print("✅ Files renamed successfully!")
How it works: The os module lets you access your computer’s file system. This script loops through every file in a folder and renames it automatically.
📧 2. Automate Email Sending
Need to send daily or weekly reports via email? Let Python do it for you. Using the smtplib module, you can send personalized emails without even opening Gmail!
import smtplib
from email.message import EmailMessage
msg = EmailMessage()
msg['Subject'] = "Weekly Report"
msg['From'] = "youremail@gmail.com"
msg['To'] = "manager@gmail.com"
msg.set_content("Hello Boss, \n\nPlease find this week’s report attached.\n\nRegards,\nPython Bot")
with smtplib.SMTP_SSL('smtp.gmail.com', 465) as smtp:
smtp.login("youremail@gmail.com", "your_app_password")
smtp.send_message(msg)
print("📨 Email sent successfully!")
Note: For Gmail, you’ll need to create an App Password for security (don’t use your main password).
📊 3. Automate Data Entry or Excel Tasks
Do you often copy-paste data from one Excel sheet to another? Python’s pandas and openpyxl libraries can help.
import pandas as pd
# Read data
data = pd.read_excel("sales_data.xlsx")
# Clean data
data["Total"] = data["Price"] * data["Quantity"]
# Save new file
data.to_excel("updated_sales.xlsx", index=False)
print("✅ Excel file updated and saved automatically!")
This is great for office tasks like updating reports, cleaning messy data, or generating summaries automatically.
🌐 4. Automate Browser Actions (Filling Forms, Logging In)
With the selenium library, Python can control a browser just like a human. It can open websites, fill forms, click buttons, and even take screenshots.
from selenium import webdriver
from selenium.webdriver.common.by import By
driver = webdriver.Chrome()
driver.get("https://www.google.com")
search_box = driver.find_element(By.NAME, "q")
search_box.send_keys("Python Automation Tutorials")
search_box.submit()
print("🔍 Search completed successfully!")
driver.quit()
This is useful for automating web tasks like logging into portals, filling forms, or downloading data.
💡 5. Automate Folder Cleanup
Python can automatically organize your messy Downloads folder by moving files based on type.
import os, shutil
source = "C:/Users/YourName/Downloads"
destination = "C:/Users/YourName/Documents/Sorted"
for file in os.listdir(source):
if file.endswith(".pdf"):
shutil.move(os.path.join(source, file), os.path.join(destination, "PDFs"))
elif file.endswith(".jpg") or file.endswith(".png"):
shutil.move(os.path.join(source, file), os.path.join(destination, "Images"))
print("🗂️ Files organized successfully!")
No more messy folders — let Python do the cleaning while you relax!
🧠 Bonus: Combine Multiple Automations
Want to go next level? Combine these small scripts into one daily automation. For example:
- Clean folder → generate report → email automatically every morning.
You can even use the schedule library to run your scripts daily:
import schedule, time
import os
def daily_task():
os.system("python automate_report.py")
schedule.every().day.at("09:00").do(daily_task)
while True:
schedule.run_pending()
time.sleep(60)
💻 1. File Renaming Code
✅ Works on Windows Desktop. You just need to:
- Change this line to your folder path:
folder_path = "C:/Users/YourName/Pictures/Vacation"
➡️ Replace YourName with your actual Windows username.
✔️ Make sure the folder exists.
📧 2. Email Sending Code
✅ Works on Windows (no browser needed).
Requirements:
- Internet connection
- Gmail App Password (for security)
- Python installed (version 3.10+ recommended)
📊 3. Excel Automation Code
✅ Works perfectly on Windows (for .xlsx files).
You’ll just need to install:
pip install pandas openpyxl
Then run from your desktop folder:
python automate_excel.py
🌐 4. Browser Automation (Selenium)
✅ Also for Windows laptop/PC.
You’ll need to:
- Install Chrome Browser
- Install Selenium
pip install selenium
And have ChromeDriver (or use webdriver-manager):
pip install webdriver-manager
Then you can control your browser automatically — like typing, clicking, searching, etc.
🗂️ 5. Folder Cleanup
✅ Designed for Windows path system too. Just update this:
source = "C:/Users/YourName/Downloads"
destination = "C:/Users/YourName/Documents/Sorted"
💡 Tip:
In Windows, always use forward slashes / or double backslashes \\ in file paths.
"C:/Users/Sandeep/Desktop"
# or
"C:\\Users\\Sandeep\\Desktop"
🧩 Final Thoughts
Automation isn’t just for tech experts — it’s for anyone who wants to save time and work smarter. Start small with one simple task and build from there. In just a few weeks, you’ll find yourself automating things you never thought possible!
Next Step: Try creating a “Morning Automation Bot” that organizes files and sends an email summary every day. It’s fun, practical, and teaches you real-world Python skills.
🔁 Key Takeaways
- Python makes daily automation simple and fun.
- Start with file renaming, emails, or Excel tasks.
- Use libraries like
os,smtplib,pandas,selenium, andschedule. - Automate → Save time → Focus on creative work!
So, what’s the first task you’ll automate with Python today? 🚀

