File and Folder Automation
Rename, sort, copy, back up and clean files automatically.
Beginner
from pathlib import Path
for f in Path("Downloads").glob("*.pdf"):
f.rename(Path("Datasheets") / f.name)
Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.
Discussion (0)
Sign in or join free to ask questions and discuss this topic.