A free, open-source batch file-rename suite with a clean GUI β replace, remove, or transform characters and words in hundreds of filenames at once, with live preview, undo/redo, and regex support.
β‘ Quick Start (EXE) Β· Features Β· Run from Source Β· How to Use Β· Regex Examples Β· Undo / Redo Β· Troubleshooting
- What Is This?
- Features
- Quick Start β Windows EXE
- Run from Source
- How to Use
- Regex Support
- Undo / Redo
- Options Reference
- File Logging
- Saved Preferences
- Troubleshooting
- FAQ
- Contact & Support
- License
ReplaceCharacter is a desktop application that renames files in bulk by finding and replacing β or completely removing β characters, words, and patterns from filenames. Instead of renaming files one by one, you load a folder, set your rules, preview the result, and apply everything in one click.
Who is this for?
- Anyone who has downloaded files with ugly naming patterns (e.g., spaces replaced by underscores, numbers prefixed, dates in the wrong format)
- Photographers, video editors, and musicians managing large media libraries
- Developers cleaning up generated or downloaded file sets
- Anyone who has ever needed to rename dozens or hundreds of files at once
Everything runs 100% locally and offline β no internet, no server, no data sent anywhere.
| Feature | Description |
|---|---|
| π Replace Mode | Find any character, word, or pattern in filenames and replace it with something else |
| ποΈ Remove Mode | Remove any word or substring from filenames entirely (replacement = nothing) |
| π Regex Support | Use full Python regular expressions instead of plain text for advanced pattern matching |
| π‘ Case-Insensitive Option | Match patterns regardless of uppercase or lowercase |
| ποΈ Live Preview | See exactly what every filename will become before applying any changes β in a clear before/after table |
| β©οΈ Undo / Redo | Instantly reverse or reapply any batch rename operation, with timestamps on each action |
| π Folder Processing | Load an entire folder and rename all files inside it in one operation |
| π Individual File Mode | Select and rename specific files only |
| π±οΈ Drag & Drop | Drag a file or folder directly onto the window to load it instantly |
| π Batch Progress Bar | Live progress bar with filename display during large batch operations |
| β±οΈ Activity Indicator | Real-time status: "Processingβ¦", "Undoingβ¦", "Redoingβ¦" |
| π§΅ Non-Blocking UI | All renaming runs in a background QThread β the window stays responsive on large folders |
| π Operation Log Panel | Color-coded timestamped log of every rename: β success, β error, β no change |
| π Optional File Logging | Write the full log to replace_character.log for an audit trail |
| πΎ Saves Preferences | Remembers your last settings (theme, regex toggle, case sensitivity, directory) between sessions |
| π¨ Light / Dark Theme | One-click toggle between light and dark themes |
| π¦ Single File | Entire app in one Python file β easy to audit, share, and run |
No Python needed.
- Go to the Releases page of this repository.
- Download
ReplaceCharacter.exe. - Double-click it β the app opens immediately. No installation required.
- Load a file or folder, set your replace rules, check the Preview tab, then click β‘ Apply Changes.
Fully portable β run it from any folder or USB drive.
- Python 3.8 or newer β https://www.python.org/downloads/
- Windows: tick β "Add Python to PATH" during installation
- PyQt6 (the only non-standard dependency β everything else is Python stdlib)
Download ReplaceCharacter_V1.py from this repository, or clone:
git clone https://github.com/Sparky2273/ReplaceCharacter.git
cd ReplaceCharacterpip install -r requirements.txtpython ReplaceCharacter_V1.pyThis mode finds every occurrence of a character or word in a filename (excluding the extension) and replaces it with something new.
- Click Select File or Select Folder β or drag and drop a file/folder onto the window.
- In the Replace section, tick the Enable Replace checkbox.
- In the Find box, type the character or word you want to replace (e.g., a space
, an underscore_, or a word likecopy). - In the Replace with box, type what you want instead (e.g.,
-). Leave it empty to delete the matched text. - Optionally enable Regex or Case-Insensitive (see below).
- Click the Preview tab to see the before/after table β verify nothing unexpected will change.
- Click β‘ Apply Changes.
Example: Replace all spaces with underscores in a folder of music files:
- Find:
(space) - Replace with:
_ - Result:
My Song Name.mp3βMy_Song_Name.mp3
This mode removes a specific word or substring from every filename β no replacement, just deletion.
- Load your file or folder (same as above).
- In the Remove section, tick the Enable Remove checkbox.
- Type the word or text to remove (e.g.,
- Copy,(1),final_). - Preview β Apply.
Example: Remove - Copy from filenames after duplicating:
- Remove:
- Copy - Result:
Report - Copy.docxβReport.docx
Tip: You can use both Replace and Remove at the same time β the replace step runs first, then the remove step is applied to the result.
Before applying any change, always check the Preview tab:
- Click the Preview tab (next to the Log tab).
- Click π Generate Preview to build the before/after table.
- The table shows three columns: Original Name, New Name, and Changed (β if the name will change, β if it stays the same).
- Files with no change are shown with a dimmed "β" marker β only files that actually change are renamed.
- If everything looks correct, switch back to the main tab and click β‘ Apply Changes.
- Click Select Folder and choose a directory.
- ReplaceCharacter processes every file directly inside that folder (not subfolders β one level deep).
- Subfolders themselves are not renamed β only the files within them.
- The progress bar shows
current / totaland the filename being processed.
Enable the Use Regex checkbox to treat the Find field as a Python regular expression instead of plain text. This gives you powerful pattern-based matching.
| Goal | Find (Regex) | Replace with | Example |
|---|---|---|---|
| Remove leading digits and a dot | ^\d+\. |
(empty) | 01. Song Name.mp3 β Song Name.mp3 |
| Replace multiple spaces with one | \s+ |
|
My File Name.txt β My File Name.txt |
| Remove anything in parentheses | \s*\([^)]*\) |
(empty) | Report (v2) Final.docx β Report Final.docx |
| Remove trailing spaces or dashes | [\s\-]+$ |
(empty) | My File - .txt β My File.txt |
| Replace underscores or hyphens | [_\-] |
|
my_file-name.txt β my file name.txt |
Remove date pattern YYYY-MM-DD |
\d{4}-\d{2}-\d{2} |
(empty) | photo_2024-03-15.jpg β photo_.jpg |
Remove bracketed numbers [1] |
\s*\[\d+\] |
(empty) | Track [1].mp3 β Track.mp3 |
Important: The extension (
.mp3,.txt,.docx, etc.) is never changed β the regex is applied only to the filename stem (the part before the last dot). You cannot accidentally remove a file extension.
- Enable Case-Insensitive together with regex to match regardless of letter case.
- If your regex is invalid, the Preview step will show an error in the log and no changes will be applied.
- Test complex patterns in the Preview tab before applying.
Every batch rename operation is recorded and can be fully reversed.
- Undo (β©) β reverses the most recent rename batch, restoring all filenames to what they were before.
- Redo (βͺ) β reapplies a rename batch that was undone.
- The Undo and Redo buttons show a label with the number of files and timestamp of the operation (e.g.,
β© Undo (12 rename(s) @ 14:35:02)). - Multiple operations are stacked β you can undo several operations in sequence.
- Undo also available from the Edit menu in the menu bar (
Ctrl+Z/Ctrl+Y).
Note: Undo only works while the app is open in the same session. Undo history is not saved to disk and is lost when the app is closed.
| Option | Description |
|---|---|
| Enable Replace | Activates the Find β Replace with step |
| Find | The character, word, or regex pattern to search for in filenames |
| Replace with | What to substitute for each match (leave empty to delete matches) |
| Enable Remove | Activates the Remove word step |
| Remove word | The exact substring to delete from every filename |
| Use Regex | Treats the Find field as a Python regex pattern |
| Case-Insensitive | Matches regardless of uppercase/lowercase for both Replace and Remove |
| Enable File Logging | Writes all log entries to replace_character.log with timestamps |
- Enable with the Enable Logging checkbox.
- Logs are written to
replace_character.login the same folder as the app. - Each entry:
YYYY-MM-DD HH:MM:SS [LEVEL] Message - Useful for auditing what was renamed on a specific date.
- File logging is off by default.
The app saves your settings to replace_character_config.json in the same folder, and restores them next time you open the app. Settings saved:
| Setting | What is remembered |
|---|---|
theme |
Light or dark theme |
use_regex |
Whether regex mode was on |
case_sensitive |
Whether case-sensitive matching was on |
enable_logging |
Whether file logging was enabled |
last_directory |
The last folder you opened |
old_char |
The last value in the Find field |
new_char |
The last value in the Replace with field |
remove_word |
The last value in the Remove word field |
Delete replace_character_config.json to reset all preferences to defaults.
"No module named PyQt6"
β Run pip install -r requirements.txt and try again.
Files were renamed but I want the original names back β Click the β© Undo button immediately β it will restore all filenames from the last operation.
Undo button is greyed out β The undo history is only kept in the current session. If you closed and reopened the app, the history is gone. You can manually redo the rename in the opposite direction (swap Find/Replace).
Regex error in the log β Your regular expression has a syntax error. Check the Pattern in the Find field β the log panel will show the exact error message. Fix the pattern and try Preview again.
Some files say "no change" in the log β The pattern did not match those filenames. This is normal β they are skipped safely.
"Permission denied" error for some files β The file may be open in another application, or you may not have write access to that folder. Close apps that have the files open and try again.
The app renamed more files than expected β Check the Preview before applying next time. Use the case-sensitive option or a more specific pattern to narrow the match.
Q: Does this change file extensions?
A: No. The extension (e.g., .mp3, .jpg, .docx) is always preserved. Only the filename stem (the name before the last dot) is changed.
Q: Can it process subfolders recursively? A: In v1.0.0, processing is one level deep (files directly inside the selected folder). Recursive subfolder support may be added in a future version.
Q: What happens if two files would end up with the same name after renaming? A: The second file's rename will fail with a "file already exists" error, which is shown in the log. The first file is renamed successfully. Use the Preview tab to spot collisions before applying.
Q: Can I use both Replace and Remove at the same time? A: Yes. Enable both checkboxes. The replace step runs first, then the remove step is applied to the result.
Q: Is this safe for system files or important files? A: Only use it on files in folders you own and manage. The undo feature can reverse mistakes within the same session. For very important files, always work on a copy first.
Q: Does the app send any data over the internet? A: No. ReplaceCharacter is 100% offline.
- Telegram: @Sparky2273
- Email: mhashemi6699@gmail.com
- Bug Reports & Feature Requests: Open a GitHub Issue
This project is licensed under the MIT License β see the LICENSE file for details.
Made with β€οΈ by SPARKS
Rename smarter, not harder.