<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Stephen Wereko</title>
    <description>The latest articles on DEV Community by Stephen Wereko (@stephen_wereko_e6560b05c1).</description>
    <link>https://dev.to/stephen_wereko_e6560b05c1</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3691793%2F167b46ed-ad27-4d4f-a6e5-64452b6d3855.jpg</url>
      <title>DEV Community: Stephen Wereko</title>
      <link>https://dev.to/stephen_wereko_e6560b05c1</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/stephen_wereko_e6560b05c1"/>
    <language>en</language>
    <item>
      <title>📁 Stop Messy Downloads Forever: Python Organizes Your Files Automatically ✅</title>
      <dc:creator>Stephen Wereko</dc:creator>
      <pubDate>Fri, 16 Jan 2026 19:05:07 +0000</pubDate>
      <link>https://dev.to/stephen_wereko_e6560b05c1/stop-messy-downloads-forever-python-organizes-your-files-automatically-16aj</link>
      <guid>https://dev.to/stephen_wereko_e6560b05c1/stop-messy-downloads-forever-python-organizes-your-files-automatically-16aj</guid>
      <description>&lt;p&gt;If your Downloads folder looks like a war zone 😭 (PDFs + images + zip files everywhere), you’re not alone.&lt;/p&gt;

&lt;p&gt;So I built a beginner-friendly Python script that automatically:&lt;/p&gt;

&lt;p&gt;✅ Organizes files into folders (PDFs / Images / Docs / Zips / Videos / Sheets)&lt;br&gt;
✅ Creates a folder for today’s date (YYYY-MM-DD)&lt;br&gt;
✅ Renames every file with a timestamp (date/time)&lt;br&gt;
✅ Prevents overwriting duplicates (_1, _2, _3…)&lt;/p&gt;

&lt;p&gt;Result: your Downloads folder becomes clean, sorted, and searchable ✅&lt;/p&gt;

&lt;p&gt;▶️ Video Tutorial (Silent Coding / No Talking)&lt;/p&gt;

&lt;p&gt;I recorded a quick walkthrough showing the before → code → run → after.&lt;/p&gt;

&lt;p&gt;📺 Watch it here: &lt;a href="https://youtu.be/A3Yz100IbLw" rel="noopener noreferrer"&gt;https://youtu.be/A3Yz100IbLw&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(You can also check my channel: &lt;a href="https://www.youtube.com/@CodeGees" rel="noopener noreferrer"&gt;https://www.youtube.com/@CodeGees&lt;/a&gt;&lt;br&gt;
)&lt;/p&gt;

&lt;p&gt;Downloads/&lt;br&gt;
  Images/2026-01-16/2026-01-16_14-20-05_photo.png&lt;br&gt;
  PDFs/2026-01-16/2026-01-16_14-20-05_report.pdf&lt;br&gt;
  Zips/2026-01-16/2026-01-16_14-20-05_project.zip&lt;br&gt;
import os&lt;br&gt;
from datetime import datetime&lt;/p&gt;

&lt;h1&gt;
  
  
  ✅ Downloads folder
&lt;/h1&gt;

&lt;p&gt;downloads_folder = os.path.join(os.path.expanduser("~"), "Downloads")&lt;/p&gt;

&lt;h1&gt;
  
  
  ✅ Today's date folder
&lt;/h1&gt;

&lt;p&gt;today_date = datetime.now().strftime("%Y-%m-%d")&lt;/p&gt;

&lt;h1&gt;
  
  
  ✅ File categories
&lt;/h1&gt;

&lt;p&gt;file_categories = {&lt;br&gt;
    "PDFs": (".pdf",),&lt;br&gt;
    "Images": (".png", ".jpg", ".jpeg", ".webp"),&lt;br&gt;
    "Docs": (".docx", ".txt"),&lt;br&gt;
    "Zips": (".zip", ".rar", ".7z"),&lt;br&gt;
    "Videos": (".mp4", ".mov"),&lt;br&gt;
    "Sheets": (".xlsx", ".csv"),&lt;br&gt;
}&lt;/p&gt;

&lt;h1&gt;
  
  
  ✅ Loop through downloads
&lt;/h1&gt;

&lt;p&gt;for filename in os.listdir(downloads_folder):&lt;br&gt;
    old_path = os.path.join(downloads_folder, filename)&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Skip folders
if os.path.isdir(old_path):
    continue

# Skip shortcuts/temp/system files
if filename.lower().endswith((".lnk", ".tmp", ".ini")):
    continue

# Find file extension
file_ext = os.path.splitext(filename)[1].lower()

# Pick category folder
category_name = next(
    (name for name, exts in file_categories.items() if file_ext in exts),
    "Other"
)

# Create target folder (type + date)
target_folder = os.path.join(downloads_folder, category_name, today_date)
os.makedirs(target_folder, exist_ok=True)

# Create timestamp rename
file_name, ext = os.path.splitext(filename)
timestamp = datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
new_path = os.path.join(target_folder, f"{timestamp}_{file_name}{ext}")

# Avoid overwriting duplicates
counter = 1
while os.path.exists(new_path):
    new_path = os.path.join(target_folder, f"{timestamp}_{file_name}_{counter}{ext}")
    counter += 1

# Rename + move
os.rename(old_path, new_path)

print("✅", filename, "→", category_name)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;print("\n🎉 Done! Downloads are now organized by type + date."&lt;/p&gt;

&lt;p&gt;✅ Try it Yourself&lt;/p&gt;

&lt;p&gt;Save the file as: downloads_folder_organizer.py&lt;/p&gt;

&lt;p&gt;Run it:&lt;br&gt;
python downloads_folder_organizer.py&lt;/p&gt;

</description>
    </item>
    <item>
      <title>I learned Python in 30 days to save my life. Here is my first script. Tags: #python #beginners #productivity #ghana</title>
      <dc:creator>Stephen Wereko</dc:creator>
      <pubDate>Sat, 03 Jan 2026 20:06:16 +0000</pubDate>
      <link>https://dev.to/stephen_wereko_e6560b05c1/i-learned-python-in-30-days-to-save-my-life-here-is-my-first-script-tags-python-beginners-32l3</link>
      <guid>https://dev.to/stephen_wereko_e6560b05c1/i-learned-python-in-30-days-to-save-my-life-here-is-my-first-script-tags-python-beginners-32l3</guid>
      <description>&lt;p&gt;In 2019, I lost my job and all my connections. By 2026, I was at my lowest point. I decided to fight back by learning Python in 30 days.&lt;/p&gt;

&lt;p&gt;I code on a laptop with broken keys and no microphone, so I record Silent Coding sessions. I am building tools for Accountants, Data Scientists, and Students.&lt;/p&gt;

&lt;p&gt;My latest script is a desktop cleaner that organizes hundreds of files in seconds.&lt;/p&gt;

&lt;p&gt;Watch the silent build here: [&lt;a href="https://www.youtube.com/watch?v=g9x5M90g5Wc&amp;amp;t=119s" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=g9x5M90g5Wc&amp;amp;t=119s&lt;/a&gt;]&lt;/p&gt;

&lt;p&gt;I am proof that you can start again with nothing. Please subscribe to support a dev from Ghana.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
