import os
import shutil

def sort_pdfs():
    path = os.path.expanduser("~/Downloads")
    pdf_folder = os.path.join(path, "PDFs")

    os.makedirs(pdf_folder, exist_ok=True)

    for file in os.listdir(path):
        if file.endswith(".pdf"):
            shutil.move(
                os.path.join(path, file),
                os.path.join(pdf_folder, file)
            )
            print(f"Moved PDF: {file}")
