ProBoard
Bots & automation
Bots & automationPublished Sep 5

File organizer moves files even in dry-run mode

`organize(..., dry_run=True)` still moves files; the `--apply` flag has no effect.

Description

Automation script that sorts a downloads folder by extension (`organizer/core.py`, `organizer/cli.py`). Problem: dry-run is ignored. Running `organizer folder` without `--apply` already moves files, which is dangerous for users who just wanted a preview. Expected: - `dry_run=True` returns the planned moves and changes nothing on disk (no new folders either); - `dry_run=False` performs the moves and creates target folders; - collisions get a `-1` suffix, unknown extensions go to `other`; - CLI keeps printing the plan and the dry-run notice. Acceptance: `python -m unittest discover -s tests` passes. Ping me here, I'll send the script and a test folder. I nearly wiped my whole downloads folder with it.

Skills

  • Python
  • Automation