XRename is a Windows tool for batch-renaming TV episodes and movies with a consistent naming scheme.
- 1.3.5
- Renames TV episode files when names contain an
SxxExxpattern. - Renames movie files using metadata from
.nfofiles, OMDb lookup (optional), filename parsing, or manual input. - Renames matching
.nfofiles alongside movie files. - Stores rename history and supports undo for the latest session.
- Can install/remove a Windows context menu for quick right-click usage.
- Can check for updates when running as a compiled
.exe.
.mkv.mp4.avi.avm
XRename.exe --s "C:\Path\To\Series"
XRename.exe --m "C:\Path\To\Movies"
XRename.exe --undo
XRename.exe --remove
Arguments:
--s {PATH}: Rename series/episode files in a file or folder.--m {PATH}: Rename movie files in a file or folder.--undo: Undo the latest recorded rename session fromhistory.json.--remove: Remove XRename context menu entries from the current user registry.
If the path is invalid or missing, XRename prints argument help.
- Detects patterns like
s01e02(case-insensitive). - Builds a cleaner show title from the part before the episode token.
- Preserves the file extension.
- Asks for confirmation when more than 50 files are queued.
Example:
MY_SHOW.s01e02.1080p.mkv -> My Show s01e02.mkv
For each movie file, XRename uses this fallback order:
- Read adjacent
.nfoand extract IMDb ID (tt...) -> query OMDb. - Parse title/year from
.nfocontent. - Parse title/year from filename.
- Ask for manual input in
Title, Yearformat.
Output format:
Title (Year).ext
If a matching .nfo exists (same-base-name.nfo), it is renamed to the same Title (Year).nfo pattern.
When running as a compiled .exe, XRename can auto-install context menu entries under current user registry:
Rename Series/EpisodesRename Movie
Registry roots:
HKEY_CURRENT_USER\Software\Classes\*\shell\XRenameHKEY_CURRENT_USER\Software\Classes\Directory\shell\XRename
OMDb is optional, but recommended for best movie title/year accuracy from IMDb IDs.
- XRename stores the key in Windows Credential Manager via
keyring(service:xrename, key:omdb). - If no valid key is available, you can skip and continue with non-API fallbacks.
- Get a key: https://www.omdbapi.com/apikey.aspx
When running as .exe, XRename checks:
- Version source:
version.txtfrom the GitHub repository - Download target: latest release
XRename.exe
If a newer version is found, XRename prompts before downloading and replacing the executable.
XRename.py: Main source script.XRename.spec: PyInstaller spec.history.json: Rename history for undo (created automatically).version.txt: Latest version marker for updater.
pyinstaller XRename.spec
- Create a backup before large rename batches.
- Existing target files are not overwritten.
- Windows-only features: context menu integration, credential storage behavior, and executable self-update flow.