The fastest way to rename a file
Select the file in Finder, press Enter (or Return), and type the new name. The filename will highlight in a box, ready for editing. When you finish typing, press Enter again to save the new name.
That is the whole process. The file stays in the same folder, and everything linked to it continues to work. You do not need to move it, copy it, or change anything else.
If you want to rename multiple files at once, or rename just part of a filename, there are faster ways depending on what you are doing. The method you choose depends on how many files you have and whether they follow a pattern.
Key Takeaways
- Press Enter on a selected file to rename it when ready without opening any menus.
- You can rename files with any characters except the colon (:), which macOS reserves for its own use.
- Renaming a file does not break links to it if the file stays in the same folder, but moving it to a different folder can break some shortcuts.
- For multiple files with similar names, use Finder's batch rename feature by selecting all files, right-clicking, and choosing "Rename Items".
- If you rename a file by mistake, press Command+Z when ready to undo the change.
Renaming files with special characters and extensions
macOS lets you use most characters in a filename, but not the colon (:). If you try to type a colon, macOS will stop you or replace it with a dash. Slashes (/) and null characters also do not work because macOS uses them for its own file system.
When you rename a file, the file extension (the part after the dot, like .jpg or .pdf) usually stays hidden. If you want to change the extension itself — for example, turning a .txt file into a .md file — you need to show extensions first. Go to Finder, click the menu bar, select View, then check Show filename extensions. Now when you rename, you can edit the extension too.
Changing the extension does change how the file behaves. A .jpg renamed to .png will not automatically convert the image; it will just confuse your Mac about what program should open it. Only change the extension if you know the file is actually in that format.
Renaming multiple files at once
If you have ten files named "Photo 1", "Photo 2", and so on, you can rename them all in one step instead of one at a time. Select all the files you want to rename (click the first one, hold Shift, and click the last one to select a range, or hold Command and click each one individually). Then right-click and choose Rename Items.
A dialog box will open. You can choose to replace text, add text before or after the existing name, or change the format entirely. For example, you can tell Finder to replace "Photo" with "Vacation" across all selected files at once. You can also add a number sequence — Finder will automatically number them 1, 2, 3, and so on.
This feature saves time when you are organizing photos from a camera, renaming downloads, or standardizing names across a project folder. The changes happen to all selected files at the same time, so double-check your settings before you click Rename.
When renaming breaks links and shortcuts
If you rename a file that stays in the same folder, nothing breaks. Programs that link to it, aliases you created, and shortcuts all continue to work because they track the file by its location, not its name.
However, if you move the file to a different folder after renaming it, some links may break. This is especially true for aliases (shortcuts you created in Finder) and links inside documents. If you have a Word document that links to a spreadsheet, and you move that spreadsheet to a different folder, the link will break and the document will not find it anymore.
The safest approach is to rename first, then organize into folders. That way, anything linking to the file will follow it to its final location.
Undoing a rename you did not mean to do
If you rename a file and when ready realize you made a mistake, press Command+Z to undo. This works as long as you have not done anything else in Finder yet. If you have already moved on to other tasks, the undo may not work.
If undo does not work, you can rename the file back manually. There is no "version history" for renamed files the way there is for documents you edit in Word or Google Docs, so your only option is to type the old name back in.
Renaming files in other Mac programs
Some programs have their own file renaming tools built in. Photos, for example, lets you rename photos directly in the app without opening Finder. Adobe Lightroom has batch renaming features that are more powerful than Finder's. If you work with a lot of files in a specific program, check whether that program has a rename feature — it might be faster than going back to Finder.
For most everyday renaming, though, Finder is the simplest tool. You do not need to open the file, launch a special program, or learn new steps. Select, press Enter, type, and you are done.
Frequently Asked Questions
Can I rename a file while it is open?
Yes. You can rename a file in Finder even if it is currently open in another program. The program will continue to work with the file under its new name. However, if the program has the file locked (which some do), Finder may not let you rename it until you close the program.
What happens if I rename a file to the same name as another file in the same folder?
macOS will not let you do it. If you try, you will get an error message saying the name is already in use. You have to choose a different name or move one of the files to a different folder first.
Can I use spaces and capital letters in filenames?
Yes. Spaces, capital letters, numbers, and most punctuation marks are fine. Only the colon (:) is forbidden. Many people avoid spaces in filenames because some older programs have trouble with them, but modern Mac programs handle them without any problem.
Does renaming a file change when it was created or modified?
No. The "Date Modified" stays the same when you rename a file. If you want to see when a file was actually created, select it in Finder, press Command+I to open the info window, and look for "Created" — that date will not change either.