How to Rename Multiple Files in Windows 10
In this article
Renaming dozens or hundreds of files one by one is tedious and slow. Windows 10 includes built-in tools that let you rename multiple files at once, either with a simple sequential pattern or with more advanced batch renaming using PowerShell. This guide covers both methods, plus how to handle common issues like file extensions and name conflicts.
What You'll Need
- A Windows 10 PC with the files you want to rename stored locally or on a connected drive.
- Administrator rights are not required for basic renaming, but you may need them for certain system folders.
- For the PowerShell method, you'll use a built-in tool—no extra software needed.
Step-by-Step
Method 1: Using File Explorer (Simple Sequential Rename)
- Open File Explorer (Win + E) and navigate to the folder containing your files.
- Select all the files you want to rename. Click the first file, then hold Shift and click the last file to select a contiguous group, or hold Ctrl and click individual files for a non-contiguous selection. You can also press Ctrl + A to select everything in the folder.
- With the files selected, press F2 on your keyboard, or right-click one of the selected files and choose Rename from the context menu.
- Type the new base name (e.g.,
Project) and press Enter. - Windows automatically renames all selected files to
Project (1),Project (2),Project (3), and so on, keeping the original file extensions.
Method 2: Using PowerShell (Advanced Batch Rename)
- Open the folder containing your files in File Explorer.
- Click File in the top-left menu, then select Open Windows PowerShell (or Open Command Prompt as administrator if you need elevated rights). Alternatively, type
PowerShellin the address bar and press Enter. - To rename files with a simple prefix and a number, use the following command:
ReplaceGet-ChildItem -File | ForEach-Object { Rename-Item $_ -NewName ("NewName_{0:D3}{1}" -f $i++, $_.Extension) }NewName_with your desired base name. This producesNewName_001.jpg,NewName_002.jpg, etc. (adjust the extension handling as needed). - To replace a specific part of existing filenames (e.g., change “old” to “new”), use:
Get-ChildItem -File | Rename-Item -NewName { $_.Name -replace "old", "new" } - To add a date prefix, use:
Get-ChildItem -File | ForEach-Object { Rename-Item $_ -NewName (Get-Date -Format "yyyyMMdd_") + $_.Name } - Press Enter to execute. Review the output for any errors.
Method 3: Using Command Prompt (Alternative)
- Open the folder in File Explorer, type
cmdin the address bar, and press Enter. - To rename files with a pattern, use the
rencommand. For example, to add a prefix to all .txt files:
This adds a three-character prefix (the ???) to each file. For more complex patterns, PowerShell is easier.ren *.txt ???_*.txt
Common Mistakes
- Changing the extension accidentally: When using F2, if you type a name that includes a dot (e.g.,
file.txt), you might change the extension. Windows warns you, but it's easy to miss. Always keep the extension as is unless you intend to change it. - Selecting the wrong files: If you select files from different subfolders, File Explorer will rename them all with the same base name, possibly causing duplicates or confusion.
- Using characters that Windows doesn't allow: Avoid
\ / : * ? " < > |in filenames. Windows will reject them. - Not checking for existing files: If the new names conflict with existing files, Windows will ask you to confirm. If you're using PowerShell, it might throw an error.
Tips
- Before batch renaming, make a backup of the files or test on a copy in a separate folder.
- Use the
{0:D3}format in PowerShell to pad numbers with leading zeros, which keeps files sorted correctly (e.g., 001, 002, ... 010). - If you need to rename files across multiple subfolders, use
Get-ChildItem -Recursein PowerShell to include all files in subdirectories. - Use a dedicated third-party app (like Bulk Rename Utility) for very complex renames, but the built-in tools cover most needs.
Troubleshooting
- Files not renaming or error “Cannot rename”: This usually happens if the file is open in another program, or you don't have permission. Close any programs using the files, or run File Explorer/PowerShell as administrator.
- Renaming doesn't apply to all selected files: If you select files from different folders, File Explorer might only rename the ones in the same folder. Make sure all selected files are in the same directory.
- PowerShell command fails with “Rename-Item : Cannot rename because item at ... does not exist”: This often occurs when the new name already exists. Check for duplicates and adjust the pattern.
- Files are renamed but with wrong extension: In PowerShell, if you use
$_.Namewithout separating the extension, you might double up. Use$_.BaseNameand$_.Extensionseparately.
Frequently Asked Questions
Can I undo a batch rename?
Yes, press Ctrl + Z in File Explorer right after the rename. For PowerShell, there is no built-in undo, so test on a sample first.
How do I rename files with a specific pattern like “IMG_001.jpg” to “Vacation_001.jpg”?
Use the PowerShell replace method: Get-ChildItem -File | Rename-Item -NewName { $_.Name -replace "IMG", "Vacation" }.
Can I rename files in subfolders as well?
Yes, add the -Recurse parameter to the Get-ChildItem command to include all subfolders.
Why does Windows add a number in parentheses instead of just renaming?
That's the default behavior to avoid overwriting existing files. If you want to overwrite, you'll need to delete the old files first or use a tool like PowerShell with the -Force parameter.
Is there a way to rename files without changing the extension?
Yes, in File Explorer, just type the new name without the dot and extension. In PowerShell, use $_.BaseName and add the extension separately.
Can I rename files using a list from Excel?
Yes, you can export a list of old names and new names, then use a PowerShell script to read the CSV and rename accordingly. This is more advanced but doable.