PBRenamer
A cross-platform graphical batch file renaming utility built with Qt 6 (PySide6).
PBRenamer lets you rename hundreds of files at once using patterns, substitutions, counters, date stamps, and metadata — all previewed live before any change is applied.
Features
- Live preview with conflict detection — renamed entries that collide with existing files or with each other are highlighted in red; the Rename button is disabled until all conflicts are resolved
- Multi-selection — apply transformations to selected files only
- Flexible renaming rules
- Pattern-based search / replace (
{#},{L},{X},{@}, capture groups…) - Text substitution (find & replace, spaces ↔ underscores / dots / dashes, case)
- Counter (
{num},{num:03}zero-padded,{num::10}start offset), conflict-free auto-number ({newnum}) - Dates (
{date},{datetime},{mdatetime}file-modification time), parent-folder name ({dir}) - Image metadata (
{im:Make},{im:Model},{im:DateTimeOriginal}… — EXIF/IPTC via Pillow) - Audio metadata (
{au:Title},{au:Artist},{au:Album},{au:Year}… — via mutagen) - Video metadata (
{vi:Title},{vi:Duration},{vi:Width},{vi:Height},{vi:VideoCodec}… — via pymediainfo) - Mixed-type templates: combining
{im:…},{vi:…}and{au:…}in the same replacement field works across file types — the non-matching tokens silently produce nothing (e.g.{im:DateTimeOriginal:%Y-%m-%d:}{vi:encodeddate:%Y-%m-%d:}uses the EXIF date for images and the encoded date for videos)
- Pattern-based search / replace (
- Directory colouring — directories are shown in a distinct colour in the file list
- Keep extension option — transformations apply to the stem only
- Recursive directory traversal
- Undo — revert the last rename batch in one click; the button shows the number of batches available for undo
- Pattern presets — save and reuse search/replace pairs
- Pattern history — LRU drop-down lists for search and replacement fields; full history browsable and editable via the History dialog
- Directory shortcuts — Shortcuts menu combines system bookmarks (GTK / macOS / Windows) with user-defined favourite directories for fast navigation; last-used directory is restored on startup
- File info — dedicated window showing filesystem metadata and embedded EXIF/ID3/media tags for any selected file
- Window state persistence — window size, position, and splitter ratios are saved and restored between sessions
- Case-aware conflict detection — honours the case sensitivity of the underlying filesystem (case-insensitive on Windows/macOS by default)
- Internationalised — English and French included; additional languages can
be added via gettext
.pofiles - Cross-platform — Linux, macOS, Windows
Download
Pre-built standalone executables are attached to every GitHub release:
| Platform | File |
|---|---|
| Linux x86-64 | pbrenamer-<ver>-linux-x86_64 |
| Windows x86-64 | pbrenamer-<ver>-windows-x86_64.exe |
| macOS (Apple Silicon) | pbrenamer-<ver>-macos-arm64.zip |
No installation required — just download and run.
Installation from source
Requirements
- Python 3.12 or later
- PySide6 6.6 or later (Qt 6)
From PyPI
pip install pbrenamer
On Linux, pip install cannot register an application menu entry by itself
(pip has no post-install hook). Run this once after installing to add a
menu entry and icon for the current user:
pbrenamer --install-desktop-entry
Remove it again with pbrenamer --uninstall-desktop-entry.
From source
git clone https://github.com/ppoilbarbe/PBRenamer.git
cd PBRenamer
pip install .
Usage
GUI mode
pbrenamer # launch the GUI (last-used directory)
pbrenamer /path/dir # launch the GUI starting in a given directory (use '.' for current)
python -m pbrenamer # launch from source
pbrenamer --help # show command-line help and exit
pbrenamer --version # print version and exit
Qt platform options (--style, --platform, --display, …) are forwarded
to Qt and can be combined with the above flags.
Headless (command-line) mode
Providing --search disables the GUI and renames files directly from the
terminal. All options that exist in the main window are available:
pbrenamer [DIR] --search TEXT [--replace TEXT] [OPTIONS]
| Option | Default | Description |
|---|---|---|
-s, --search TEXT |
(required¹) | Search pattern — activates headless mode |
--saved NAME |
(required¹) | Load a named preset — activates headless mode; CLI options override preset values |
-r, --replace TEXT |
"" |
Replacement string |
--mode {pattern,regex,plain} |
pattern |
Search mode |
--list {files,dirs,all} |
files |
Entry types to process |
--recurse / --no-recurse |
--no-recurse |
Recurse into sub-directories |
--keep-ext / --no-keep-ext |
--keep-ext |
Preserve the file extension |
--filter GLOB |
(none) | Restrict listing to matching entries |
--accent / --no-accent |
--no-accent |
Strip diacritics from result names |
--dup / --no-dup |
--no-dup |
Collapse consecutive duplicate separators |
--sep {none,space-underscore,…} |
none |
Separator conversion applied after rename |
--case {none,upper,lower,capitalize,title} |
none |
Apply capitalisation after rename |
--confirm / --no-confirm |
--no-confirm |
Preview and confirm before renaming |
--debug / --verbose / --quiet |
(saved pref) | Override the saved log-level preference |
--config-dir DIR |
(platform default) | Override the configuration directory (intended for testing) |
¹ Exactly one of --search or --saved is required.
Examples
# Replace underscores with hyphens, preview first
pbrenamer ~/Photos --search "_" --replace "-" --mode plain --confirm
# Number all JPEG files: photo_001.jpg, photo_002.jpg, …
pbrenamer ~/Photos --search "{L}" --replace "photo_{num:03}" --filter "*.jpg"
# Strip diacritics and upper-case everything, recursively
pbrenamer ~/docs --search "{X}" --replace "{1}" --recurse --accent --case upper
# Rename using a regex capture group
pbrenamer . --search "img(\d+)" --replace "photo_{1}" --mode regex
Conflicting renames (two files mapping to the same target, or target already
exists) are detected and skipped automatically; --confirm shows them flagged
as [CONFLICT] before you confirm.
Documentation
Full documentation is available at pbrenamer.readthedocs.io.
Contributing
See CODING.md for developer setup, coding conventions, and the release process.
The development environment is managed with pixi, but all make targets can
run against a plain Python environment by setting NOCONDA=1 (see CODING.md).
License
PBRenamer is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License v3 as published by the Free Software Foundation. See the LICENSE file for details.
Copyright © 2026 PBMou — Marcel Spock mrspock@cardolan.net
Author
Marcel Spock mrspock@cardolan.net PBMou
PBMou is a cross-language pun: "PB" stands for "Poilbarbe", and "Mou" is the French translation of "Soft" — so PBMou reads like "PBSoft" half-translated into French.
Acknowledgements
PBRenamer is heavily inspired by pyRenamer, an earlier graphical batch file renamer for Linux. Many thanks to its authors, Adolfo González Blázquez code@infinicode.org and Thomas Freeman tfree87@users.noreply.github.com, for their great work.
Release files for pbrenamer 1.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pbrenamer-1.6.0.tar.gz | 579.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pbrenamer-1.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 972.0 kB
Release files / pbrenamer-1.6.0.tar.gz
| Download URL | pbrenamer-1.6.0.tar.gz |
|---|---|
| Size | 579.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
496e13e14ed640cf6c33cf65ff40bbfec34955611499af032a64f103083a5bb9
|
|
BLAKE2b-256 checksum How to use checksums |
e44155403acc3b455b51e08b4fca7421a75c288cce77253d9b45012841f385db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / pbrenamer-1.6.0-py3-none-any.whl
| Download URL | pbrenamer-1.6.0-py3-none-any.whl |
|---|---|
| Size | 392.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8690036b5de5fdef2a3e74ff6cae74946cd4644c90000f3f2baea9c21d65e2ef
|
|
BLAKE2b-256 checksum How to use checksums |
659ce39bae5dc6cc57668fdfd6b4aa129f7d151b5dac2c14234f31efd5c73261
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|