How do I rename a lot of files at once?
The built-in bulk rename on Windows and Mac, a naming pattern that sorts itself, and how to avoid renaming the wrong hundred files.
- Difficulty
- beginner
- Time
- 20 min
- Read
- 3 min
Short answer
Both Windows and macOS rename in bulk without extra software: select the files, choose rename, and either type one name to number them sequentially or use the Mac's find-and-replace rename. Copy the files to a working folder first so a mistake costs nothing.
Bulk renaming is one of those capabilities that is built in, unadvertised and immediately useful — scanned documents, photographs from a camera, and files inherited with meaningless names.
Step by step
- Work on a copy the first time.Copy the files into a temporary folder and rename there. There is no undo once you have closed the window, and a bad pattern applied to four hundred files is tedious to reverse.
- Decide the pattern before you start.Date first in year-month-day order, then who or what, then a detail: 2026-03-11-britishgas-bill. It sorts chronologically on its own and searches well.
- Use sequential numbering on Windows.Select the files in the order you want, press rename, type one name and press enter. Windows appends numbers in brackets. Sort the folder first, because the selection order follows the current sort.
- Use the Mac's rename options for more control.Select the files, right-click and choose rename. It offers find and replace, adding text before or after, and formatting with a counter or a date, which covers most needs.
- Pad your numbers.Use 01, 02 rather than 1, 2 if there will be more than nine. Otherwise 10 sorts before 2 and the order looks wrong forever.
- Avoid characters that cause problems.Slashes, colons and question marks are rejected or cause trouble when files move between systems. Stick to letters, numbers, hyphens and full stops.
- Leave file extensions alone.The part after the final full stop tells the computer which program opens the file. Changing it does not convert anything and usually makes the file appear broken.
- Check the result before deleting the originals.Sort by name, look at the first and last few, and open one. Only then remove the originals.
Tips
- Photographs are better organised by date taken than by filename. Photo apps do this automatically, so renaming is often unnecessary for images.
- If you rename a lot regularly, a dedicated bulk rename tool adds previewing and undo, which the built-in tools lack.
- Renaming files that live in a synced cloud folder re-uploads all of them. Do the work locally with sync paused if it is a large batch.
Common mistakes
- Renaming in place with no copy — There is no reliable undo once the window is closed, and a wrong pattern across hundreds of files means renaming them all again by hand.
- Putting the date at the end — Files sort by name from the left. A date at the end sorts by subject instead of chronologically, which loses most of the benefit.
If it doesn't work
Files numbered in the wrong order
Cause: The selection order followed the folder's current sort — Fix: Sort the folder by date or by the order you want first, then select and rename again.
Files will not open after renaming
Cause: The extension was changed or removed — Fix: Rename it back to the correct extension. Turn on 'show file extensions' so you can see what you are editing.
Rename option is greyed out
Cause: The files are open, read-only, or on a drive you lack permission for — Fix: Close any program using them, check the folder is not read-only, and copy them locally if they are on a network share.
Questions people ask
Can I rename files inside subfolders at once?
Not with the built-in tools, which work on the current selection. Either handle each folder, or use a dedicated bulk rename utility that can recurse.
Will renaming break links in documents?
It can. Documents that link to a file by name — spreadsheets, web pages, some design files — lose the link when the target is renamed. Rename before creating links, not after.