A lightweight, modern WPF desktop application for batch renaming or copying files with find-and-replace text matching, regex support, live preview, and one-click restore.
File Renamer is a Windows desktop utility built with C# and WPF (.NET Framework 4.8) for quickly batch-renaming or batch-copying files in a folder. It wraps simple find-and-replace or regex-based matching in a clean, frameless, themeable UI, shows a live preview of the resulting filenames before you commit, and can generate a restore log so any batch operation can be undone with a single click.
- Rename in-place or copy to a new folder — apply changes directly to the source folder, or copy matching files (renamed) into a separate output folder, leaving the originals untouched.
- Find & replace or regex matching — match filenames with plain text substrings or full regular expressions, with immediate validation of regex syntax.
- Built-in presets — 10 one-click presets for common cleanup tasks: Standard Replace, Remove Brackets, Remove Numbers, Remove Symbols, Remove Extra Spaces, Trim Leading/Trailing Spaces, Spaces to Underscores, Spaces to Dashes, Remove Leading Track Numbers, and Custom Regex.
- Live rename preview — see exactly how a sample filename will be transformed as you type, with a cheat-sheet panel for regex presets.
- File type filtering — restrict operations to a specific extension or wildcard filter.
- Restore log & one-click undo — optionally generate a
rename_log.csvfor every batch run, then use Restore to revert renames or delete copies and roll back the operation. - Collision-safe copying — if two files would resolve to the same output name in a single Copy batch, the duplicate is safely skipped and flagged as
Failedinstead of silently overwriting the first file's output. - Cancellable batch operations — long-running batches execute asynchronously and can be cancelled mid-run without leaving the UI unresponsive.
- Live results grid — every processed file is logged with its status (Renamed, Copied, Restored, Failed, etc.), auto-scrolling to the latest entry.
- Audible alerts — optional sound notification when a batch operation completes.
- Light & dark themes — toggle between light and dark UI themes, applied dynamically via frozen WPF brushes for smooth rendering, with all labels (including mode/option controls) following the active theme.
- Custom window chrome — frameless, draggable title bar for a modern look.
- Persistent settings — theme preference is automatically saved to and restored from
%LocalAppData%\File Renamer\settings.json.
- Windows 7 SP1 or later (Windows 10/11 recommended)
- .NET Framework 4.8 (typically pre-installed on modern Windows)
- Visual Studio 2019/2022 with the .NET desktop development workload (only required to build from source)
- Clone the repository:
git clone https://github.com/xecvas/FileRenamer.git cd FileRenamer - Open
File Renamer.slnin Visual Studio. - Build the solution (
Ctrl+Shift+B) or publish aReleasebuild. - Run
File Renamer.exefrombin/Release(orbin/Debug).
Alternatively, download the latest pre-built executable from the Releases page and run File Renamer.exe directly — no installation required.
- Launch File Renamer.
- Click Browse to select a Source Folder containing the files you want to process.
- Choose Rename in-place to modify files directly, or Copy to new folder and select an Output Folder to leave originals untouched.
- Enter the text (or regex pattern) to Find and what to Replace it with, or open Advanced Setting to pick a ready-made preset (Remove Brackets, Remove Numbers, Remove Symbols, Remove Extra Spaces, Trim Spaces, Spaces to Underscores, Spaces to Dashes, Remove Leading Track Numbers, or Custom Regex).
- Optionally set a file extension/filter, enable Create restore log, and enable Play sound notification.
- Click Rename to run the batch. Results stream into the grid in real time with a status per file.
- Click Cancel at any time to halt a running batch.
- If a restore log exists for the selected folder, click Restore to undo the last batch (reverting renames or removing copies).
Your theme preference is remembered automatically between sessions.
Recent fixes & additions:
- Fixed: opening/reopening the Advanced Setting panel while on "Standard Replace" or "Custom Regex" no longer wipes out text you'd already typed into Find.
- Fixed: in Copy mode, if two files would resolve to the same output filename in one batch, the second no longer silently overwrites the first — it's now reported as
Failedand the first file's copy is preserved. - Fixed: clicking into a text field no longer permanently disables the window's auto-recenter behavior (only an actual drag does).
- Fixed: Rename in-place, Copy to new folder, Create restore log, and Play sound notification labels now correctly switch to white text in dark mode instead of staying black.
- Added: 5 new presets — Remove Extra Spaces, Trim Leading/Trailing Spaces, Spaces to Underscores, Spaces to Dashes, and Remove Leading Track Numbers.
File Renamer/
├── Models/
│ ├── Models.cs # RenameConfig, LogEntry, and ProgressData data models
│ └── Services.cs # FileOperationService — core rename/copy/restore engine
├── Utilities/
│ └── RenamerHelper.cs # Win32 folder browser dialog helper
├── assets/ # Icons and images
├── App.xaml / App.xaml.cs # Application entry point
├── AppSettings.cs # Persisted user settings (load/save as JSON)
├── AboutWindow.xaml / .xaml.cs# About dialog
└── MainWindow.xaml / .xaml.cs # Main UI and interaction logic
- C# / WPF on .NET Framework 4.8
System.IO/System.Text.RegularExpressions— file enumeration and pattern matchingSystem.Web.Script.Serialization.JavaScriptSerializer— settings persistenceSystem.Windows.Forms.FolderBrowserDialog— folder picker
Contributions are welcome! If you'd like to contribute:
- Fork the repository.
- Create a feature branch (
git checkout -b feature/my-feature). - Commit your changes (
git commit -m "Add my feature"). - Push to the branch (
git push origin feature/my-feature). - Open a Pull Request.
Please keep changes consistent with the existing .NET Framework 4.8 / WPF target and avoid introducing dependencies on newer .NET runtimes.
This project is licensed under the terms found in LICENSE.txt.
Created with ❤️ by xecvas

