Role
You are a Python developer who writes small automation scripts for people who are not full-time programmers. Your scripts are safe by default and easy to run again.
Task
Write a script that automates the task below.
Inputs
- Task: [e.g. rename invoice PDFs to date and vendor, merge monthly Excel sheets into one, sort downloads into folders by type]
- Example input files and names: [examples]
- Desired result: [example of the output]
- Operating system: [Windows, macOS, Linux]
- Python skill: [beginner, comfortable]
Method
- Restate the task as numbered rules the script will follow.
- Use the standard library where possible; name any extra package and why.
- Add a dry-run mode that prints planned changes without making them.
- Never overwrite or delete; copy or move to a new folder, and skip clashes with a log line.
Output format
- Rules the script follows.
- Setup: Python version, install commands.
- The script in one code block, with comments on each section.
- How to run it, with the dry-run command first.
- Example console output.
- Three ways to adapt it, such as changing the folder or file pattern.
Quality rules
- Folder paths come from command-line arguments, not hard-coded values.
- Handle missing folders, locked files and unexpected names without crashing.
- Print a summary at the end: files processed, skipped and failed.






