Skip to content

Deterministic renamer for Accounting reference artifacts (Bills, receipts, statements) to the Naming System.md §4 convention (Vendor_YYYY-MM-DD.pdf, folder-collapsed).

  • Location: D:\FSS\Software\Utils\PythonUtils\rename_receipts\
  • Package: uv-managed, own git repo
Terminal window
cd D:\FSS\Software\Utils\PythonUtils\rename_receipts
uv sync
uv run rename-receipts D:\FSS\Accounting # dry-run (default)
uv run rename-receipts D:\FSS\Accounting --execute

Scope (hardcoded, 2026-07-29; extended 2026-08-17)

Section titled “Scope (hardcoded, 2026-07-29; extended 2026-08-17)”
  • Bills\, Expenses\AI Tools\, Statements\Chequing\, Statements\CreditCard\
  • Statements\Investments\2025\ (BMO Investorline) — AccountNumber_MMYYYY.pdf → AccountNumber_YYYY-MM.pdf (day dropped; statement already carries its exact date inside). Other years not in scope (untouched, still MMYYYY).
  • Only files dated on/after CUTOFF_DATE (2025-06-01) — set in main.py (Investments plan is not cutoff-gated; Talbot asked for all 12 of 2025)
  • Vendor/date extraction is per-folder deterministic logic, not AI — see module docstring for how each folder’s pattern is parsed

os.rename() and even rm can fail with PermissionError deleting specific pre-existing files on /mnt/d from WSL, even with -rwxrwxrwx shown — not systemic (a freshly-created test file deletes fine), likely a transient lock (backup/AV scan) on that specific file. The utility copies + byte-verifies + deletes; on a delete failure it leaves both old and new copies (zero data loss) and prints a Remove-Item PowerShell command to finish cleanup from Windows.

FY26+ (≥2025-06-01) rename across the 4 in-scope folders: Bills\ needed 0 changes (already compliant), 25 files renamed elsewhere (7 receipts, 18 statements). 3 of the 25 hit the WSL delete-lock above and needed a manual PowerShell Remove-Item — full decision trail: Core/Processes/Logs/2026-07-29_File-Naming-Reference-Artifacts.md.

Statements\Investments\2025\ (BMO Investorline) joined §4-adjacent naming (day dropped, decided by Talbot). Added plan_investments(), dry-run verified, executed — 12 of 12 files renamed clean, no lock issues. Still-deferred vault-wide-beyond-Accounting rename tracked in Core/Processes/Tasks/File-Naming-Vault-Wide-Rollout.md.