
Windows actually has several built-in ways to rename large numbers of files. Knowing these tricks can save you a lot of time.
We often download piles of images and files from the web, and their names are usually a mess. To keep things tidy we like to rename a whole series following our own rules — but with lots of files, renaming each one by hand is exhausting.
Fortunately Windows has batch-renaming features built in; most people just don't know how to use them. Here are three approaches: File Explorer, the Command Prompt, and PowerShell.
File Explorer
File Explorer is the most convenient tool — no commands to learn — though its features are fairly basic. Steps:
STEP 1 — Open File Explorer and find the files you want to rename.
STEP 2 — Select the files.
STEP 3 — Right-click the first file and choose "Rename".
STEP 4 — Type the new name.
STEP 5 — Press Enter.
STEP 6 — File Explorer renames every selected file to the name you gave, numbering them in their original order.
Command Prompt
In the Windows command prompt, use the rename (or ren) command with wildcards (*) to rename many files at once.
STEP 1 — To open a command prompt for renaming, hold Shift, right-click an empty area inside the folder, and choose "Open command window here".
STEP 2 — Use rename / ren to batch-rename. The most common use is changing the extension:
ren *.html *.txt
STEP 3 — Done.
PowerShell
PowerShell is more powerful than the command prompt — it can chain multiple commands together with pipes, just like the Linux shell.
Suppose we have files whose names contain many spaces; the example below replaces every space with a hyphen (-).
STEP 1 — Find Windows PowerShell in the Start menu and open it.

STEP 2 — After switching to the folder containing the files, use Dir to list all file names and pipe them to Rename-Item:
Dir | Rename-Item -NewName { $_.name -replace " ", "-" }
STEP 3 — Done.
Here are a few more advanced PowerShell examples.
Rename all jpg files to image_<number>.jpg, with a starting number you choose:
# Rename every JPG file to image_<number>.jpg
Get-ChildItem *.jpg | ForEach-Object -Begin {
$count = 1
} -Process {
Rename-Item $_ -NewName "image_$count.jpg"
$count++
}
Normalize every *.jpeg extension to jpg:
# Change all *.jpeg extensions to .jpg
Get-ChildItem *.jpeg | Rename-Item -NewName { $_.name -replace "\.jpeg$", ".jpg" }
Find every *.jpg file whose name contains oldstring and replace it with newstring:
# In all *.jpg files, find names containing "oldstring"
# and replace "oldstring" with "newstring"
Get-ChildItem *.jpg -Filter "*oldstring*" | ForEach {
Rename-Item $_ -NewName $_.Name.Replace("oldstring","newstring")
}
PowerShell can do far more than this — it offers rich automation and system-administration capabilities. If you're interested, see Microsoft's official tutorial.
Quantum Responses (0)