# Batch Rename Rename many files at once with a pattern like `Home01, Home02, Home03…`. Double-click `BatchRename.exe` — it runs on Windows 10/11 with nothing to install. ## How to use 1. Drag files or folders onto the window (or onto `BatchRename.exe` itself), or use **Add files… / Add folder…**. 2. Put them in the order you want numbered: **Sort by**, or select rows and use **Move up / Move down**. 3. Set the new name: - **Text before number** – the static part (`Home`) - **Add a number** – start at, count by (step), **leading zeros** with a chosen number of digits - **Text after number** – optional (`001 - Vacation`) - **Number source**: - *Count up in list order* – 01, 02, 03… (start at / count by) - *Keep number from file name* – reuses the number already in each name, so a series keeps its episode numbers. *Which number* is auto-detected (the one that changes between files: `Boston.Legal.1x05…` → `05`), or pick 1st / 2nd / … / last yourself. *Keep endings like "_e"*: files sharing a number (a video and its subtitles) keep the bit that tells them apart, e.g. `Boston.Legal.1x01.DVDRip.MP3-iMa_e.smi` → `Boston Legal S01E01_e.smi`. The *Number in name* column shows what was picked for each file. 4. Extension (default: unchanged): - **Keep original extensions** - **Change all to:** one extension for every file (leave empty to remove extensions) - **Choose for each file:** double-click a cell in the *New extension* column, or select several rows and use *Apply to selected* 5. Check the **New name** column (problems show in red), then click **Rename files**. **Undo last rename** puts everything back. Tip: **Keep original names** changes only extensions. ## Safety - Nothing is renamed until you confirm. - Blocked before renaming: duplicate names, names that already exist in the folder, characters Windows doesn't allow (`< > : " / \ | ? *`), reserved names (CON, NUL, COM1…), names ending in a dot or space, paths over 260 characters. - Files are renamed through temporary names, so swaps (`A→B`, `B→A`) and case-only changes work. If any rename fails midway, every file is put back. ## Building from source ``` dotnet build src -c Release # -> src/bin/Release/net48/BatchRename.exe dotnet run --project tests # engine tests ``` `src/RenameEngine.cs` holds all the renaming logic (no UI); `src/MainForm.cs` is the window.