
Python Automation for Beginners: 5 Scripts That Save You Hours Every Week
You don't need to be a senior engineer to automate your work. These 5 Python scripts require zero experience to run and genuinely save time. I'll walk you through each one — what it does, the full code, and how to use it. Prerequisites You only need Python installed. That's it. Check if you have it: python3 --version If not, download from python.org . Takes 3 minutes. Script 1: Rename 100 Files in 3 Seconds The problem: You have 100 photos named IMG_3847.jpg and need them renamed to 2026-03-22-photo-001.jpg . The script: import os from datetime import datetime folder = " ./photos " # change this to your folder path date = datetime . now (). strftime ( " %Y-%m-%d " ) files = [ f for f in os . listdir ( folder ) if f . endswith (( ' .jpg ' , ' .png ' , ' .jpeg ' ))] files . sort () for i , filename in enumerate ( files ): extension = os . path . splitext ( filename )[ 1 ] new_name = f " { date } -photo- { i + 1 : 03 d }{ extension } " old_path = os . path . join ( folder , filename ) new
Continue reading on Dev.to Python
Opens in a new tab




