How to Rename a File or Folder on Mac (Shortcut, Finder, Terminal)

NameQuick Team··Guides

Need names from what's inside the files? Choose your download

Learn More in the Docs

Batch rename by content, not by pattern

Finder renames by pattern. NameQuick reads what's inside each file and names the whole batch accordingly — with preview and undo.

Joinhappy customers

Renaming a file on a Mac takes one key: select the file in Finder and press Return. That is the Mac equivalent of F2 on Windows. This guide covers that and every other way to rename a single file or folder on macOS: the Control-click menu, Get Info, renaming a document while it's open, disks, file extensions, Terminal, iCloud Drive, and what to do when Finder refuses. The Finder steps follow Apple's own guide to renaming files, folders, and disks on Mac.

Renaming a whole selection in one go is a different job, covered step by step in how to rename multiple files at once. For Windows and Linux shortcuts, see how to rename a file.

How to rename a file on Mac in Finder

  1. Open Finder and click the file once to select it.
  2. Press Return. The name turns into an editable text field.
  3. Type the new name.
  4. Press Return again to save it, or press Esc to cancel.

If the filename extension is visible, Finder highlights only the part of the name before it, so what you type replaces the name and leaves .pdf or .jpg in place.

There are four other ways to open the same name field:

  • Control-click (or right-click) the file and choose Rename.
  • Select the file and choose File > Rename from the menu bar.
  • Force click the file's name, if your trackpad supports Force Touch.
  • Click the name of a file that is already selected, then wait a moment.

All of them work in every Finder view (icons, list, columns and gallery) and on the desktop.

Made a mistake? Press Command-Z, or choose Edit > Undo, straight after renaming and the old name comes back.

What a Mac filename can contain

Apple's rules are short. You can use numbers and most symbols, but a name can't include a colon (:) or start with a period (.), and some apps don't accept a slash (/) in a filename. macOS reserves names that start with a period for hidden system files, which is why Finder won't let you create one.

If another item in the same folder already has the name you type, Finder asks you to choose a different one. For what to call your files once you know how, see file naming conventions.

The Mac rename shortcut, and why F2 doesn't work

What you wantOn a Mac
Rename the selected file or folderReturn
Rename from a menuControl-click > Rename, or File > Rename
Undo the renameCommand-Z
Open Get Info (name, extension, Locked, permissions)Command-I
Save a copy of an open document under a new nameHold Option, then choose File > Save As

On Windows, F2 renames the selected file. On a Mac, the top row of keys controls features such as display brightness by default (see Apple's guide to using the function keys on your Mac), and Finder has no F2 rename command. If F2 is muscle memory, you can add it yourself:

  1. Choose Apple menu > System Settings, click Keyboard, then click Keyboard Shortcuts.
  2. Select App Shortcuts, click the Add button (+), and choose Finder from the Application pop-up menu.
  3. In Menu Title, type Rename, exactly as the command appears in Finder's File menu.
  4. Click the Keyboard Shortcut field, press F2, then click Done.

On most Mac keyboards you then press Fn-F2 (or Globe-F2), unless you have turned on Use F1, F2, etc. keys as standard function keys in Keyboard settings. On macOS Monterey and earlier, the same options are under System Preferences > Keyboard > Shortcuts. Apple's guide to creating keyboard shortcuts for apps has the details, and its full list of Mac keyboard shortcuts covers the rest of Finder.

Rename a file from its Get Info window

Get Info is the slower route, but it puts the name next to the settings that most often block a rename.

  1. Select the file and press Command-I, or choose File > Get Info.
  2. In the Name & Extension section (click the arrow next to it if it's collapsed), edit the name.
  3. Press Return, or close the window.

The same window has the Hide extension checkbox, the Locked checkbox and Sharing & Permissions, all of which come up again below.

Rename a document while it's open

You don't have to close a document and go back to Finder to rename it. Apple's own apps, such as Pages, Numbers, Keynote, TextEdit and Preview, let you rename the file you're working in:

  • Click the document's name in the title bar. In some apps you hold the pointer over the title and click the arrow that appears next to it. Type a new name and press Return.
  • Choose File > Rename, where the app offers it, as TextEdit and Preview do.
  • Save a copy under a new name by holding Option and choosing File > Save As, or by choosing File > Duplicate. The original keeps its name.

Apple describes the title-bar method in its guide to saving and naming a Pages document.

How to rename a folder on Mac

A folder renames exactly like a file: select it, press Return, type the new name and press Return. Control-click > Rename works too.

Apple adds a few cautions for folders:

  • Don't rename app folders or items that came with macOS, such as the Library folder.
  • Don't rename your home folder, the one with your name on it. Changing your user account and home folder name is a separate procedure, done from a different administrator account, which Apple documents in change the name of your macOS user account and home folder.
  • If something stops working after a rename, change the name back. If that doesn't help, Apple says you may need to reinstall the software.

Also think about anything that remembers the folder by its path, such as a backup set, a sync setting or a script. Point those at the new name after you rename the folder.

How to rename a hard drive or USB drive on Mac

Apple's rename guide covers disks too, including the Mac's internal disk.

  1. In Finder, choose Go > Computer to see all your disks, or find the disk on the desktop.
  2. Select the disk and press Return.
  3. Type the new name and press Return.

A disk that macOS opens read-only can't be renamed this way. Common examples are a Windows NTFS drive and an SD card with its lock switch turned on.

How to show, hide and change a file extension on Mac

The extension is the period and the few letters at the end of a filename, such as .pdf, .docx or .jpg. macOS usually hides them, which is why a file can look like Invoice in Finder and Invoice.pdf everywhere else. Apple's guide to showing or hiding filename extensions has two switches:

  • For every file: choose Finder > Settings, click Advanced, and select Show all filename extensions. (On macOS Monterey and earlier, it's Finder > Preferences.) This shows every extension, even on files set to hide theirs.
  • For one file: select it, press Command-I, open Name & Extension, and select or deselect Hide extension.

When the extension is hidden, a rename changes only the name and the extension stays as it was. To change the extension itself, show it first, then rename the file and type the new ending. Finder asks whether to keep the old extension or use the new one. That prompt comes from Show warning before changing an extension, in the same Advanced settings.

Changing an extension renames the file. It doesn't convert it. Apple warns that if you change an extension, you may no longer be able to open the file with the app that created it. To turn a HEIC photo into a JPEG, or an image into a PDF, open it in Preview, choose File > Export and pick the format, as Apple's guide to converting image file types in Preview shows.

How to rename a file in Terminal on Mac

Terminal's mv command renames a file by "moving" it to a new name in the same folder. Open Terminal (in Applications > Utilities), go to the folder, and run mv with the old name and then the new one:

cd ~/Downloads
mv "Scan 2026-09-24.pdf" "2026-09-24 Lease renewal.pdf"

A few things to know before you use it:

  • Quote names that contain spaces, as above. Or type mv , then drag the file from Finder into the Terminal window to insert its full path.
  • mv overwrites without asking. If a file with the new name already exists, it is replaced. Use mv -n to never overwrite, or mv -i to be asked first.
  • Folders rename the same way, with one catch: mv "Old folder" "New folder" moves Old folder inside New folder if a folder with that name already exists.
  • There is no Command-Z. Finder's undo doesn't cover Terminal. To reverse a rename, run mv again with the names swapped.

For loops that rename a whole folder of files, see the Terminal section of how to rename multiple files at once.

How to rename files in iCloud Drive

Files and folders in iCloud Drive rename in Finder exactly like local ones. Apple says changes such as renaming a file appear on all your devices that have iCloud Drive turned on, so the new name shows up in the Files app on your iPhone and iPad as well. You can also rename on iCloud.com: open iCloud Drive, select the item, open the menu in the top-right corner, choose Rename, type the name and press Return.

Dropbox, Google Drive and OneDrive folders in Finder work the same way: rename the file in Finder, and the provider's own app syncs the new name.

When your Mac won't let you rename a file

Work down this list, starting with the Get Info window (Command-I).

  • The file is locked. Press Command-I and deselect Locked. Apple's guide to locking a document shows the checkbox, and its Pages guide explains that locking stops a document from being accidentally edited, moved, deleted or renamed.
  • You don't have permission. In Get Info, open Sharing & Permissions. If your privilege is Read only, click the lock, enter an administrator name and password, and choose Read & Write. Check the folder that contains the file as well. Apple's guide to changing permissions walks through it. For a file that belongs to someone else, such as on a shared drive, ask the owner.
  • It's a system item. App folders, items that came with macOS and your home folder are the ones Apple tells you not to rename.
  • The name isn't allowed. Remove any colon, don't start with a period, and pick a name that isn't already used in that folder.
  • The disk is read-only, such as an NTFS drive, a locked SD card, or a network share where you can only read.

New in macOS Golden Gate: suggested names

On macOS Golden Gate (macOS 27, released in September 2026), Finder can suggest a name when you rename a file or folder, based on the item's content and on the names of the other files in the folder. Pages, Numbers and TextEdit suggest names for new documents in the same way. The feature needs Apple Intelligence to be turned on. The option is called Suggest file names and sits in Finder > Settings > General. Turn it off there if you'd rather type every name yourself.

The suggestions show up for the item you're renaming by hand. They don't rename a folder of files for you.

Renaming many files at once

Finder can rename a whole selection: select the files, Control-click one of them, choose Rename, then pick Replace Text, Add Text or Format. How to rename multiple files at once walks through each mode, sequential numbers, Terminal loops and undo.

When every file needs its own name from what's inside it

Finder's batch tool edits the text that's already in the names. It can't tell that Scan_0042.pdf is a lease and Scan_0043.pdf an electricity bill, so it gives them one pattern, not two different names. If you would otherwise open every file to decide what to call it, that's content-based renaming.

NameQuick is the app that renames files based on their content, for Mac and Windows. It reads the text of documents, and for scanned PDFs and photos the AI model reads the page image, so there is no separate OCR step to set up. Each file gets its own proposed name, such as 2026-09-02_Maple-Street_Lease-Renewal.pdf, and in Review mode nothing is renamed until you approve it. Every rename is recorded in History, where you can undo it while that is still possible. You choose how the AI runs: Managed AI, your own provider key, or a local model that keeps the analysis on your computer.

NameQuick needs macOS 11 or later on a Mac, and also runs on Windows. The Self-Managed license is $69 one time and comes with a 50-rename trial, no card required. Managed plans cost $12 to $99 a month. The Mac batch rename guide shows the workflow on real folders.

Try this on your own messy batch

The Self-Managed trial includes 50 renames in the app, no card required. Preview every name before you apply.

Joinhappy customers

To try it on your own files, Choose your download.

FAQ

What is the shortcut to rename a file on a Mac?

Select the file in Finder and press Return, type the new name, and press Return again. It's the Mac equivalent of F2 on Windows. You can also Control-click the file and choose Rename.

Why doesn't F2 rename files on a Mac?

Finder has no F2 rename command, and on most Mac keyboards the top-row keys control features such as display brightness by default. Use Return instead, or assign F2 to Finder's Rename menu command under System Settings > Keyboard > Keyboard Shortcuts > App Shortcuts.

How do I rename a folder on a Mac?

The same way as a file: select the folder, press Return, type the new name and press Return. Leave your home folder, app folders and folders that came with macOS, such as Library, as they are. Apple warns that renaming them can cause problems.

How do I change a file extension on a Mac?

Turn on Show all filename extensions in Finder > Settings > Advanced, then rename the file and type the new extension. Finder asks whether to keep the old extension or use the new one. Changing the extension doesn't convert the file. To convert an image, open it in Preview and use File > Export.

Why can't I rename a file on my Mac?

Most often the file is locked, you don't have Read & Write permission, or the name isn't allowed. Check the Locked checkbox and Sharing & Permissions in Get Info (Command-I), remove any colon or leading period, and make sure the disk isn't read-only.

Can I undo a rename on a Mac?

Yes. Press Command-Z or choose Edit > Undo in Finder straight after renaming. Renames made with mv in Terminal can't be undone that way. Run mv again with the names swapped.

How do I rename a file in Terminal on a Mac?

Go to the file's folder with cd and run mv "old name.pdf" "new name.pdf". Add -n so an existing file with the new name is never overwritten, or -i to be asked first.

How do I rename a photo on a Mac?

If the photo is a file in Finder, rename it like any other file. In the Photos app, photos have titles rather than filenames you can edit: select a photo, press Command-I and add a title, then choose Use Title as the file name when you export it. Apple's guide to exporting from Photos lists the naming options.

How do I rename multiple files at once on a Mac?

Select them in Finder, Control-click one of them and choose Rename, then pick Replace Text, Add Text or Format and click Rename. The full walkthrough is in how to rename multiple files at once.

The NameQuick team writes practical guides for file organization, document workflows, and automation with NameQuick.

Batch rename free

Ready to rename the whole folder at once?

Download NameQuick, drop in a messy batch, and see the new names before anything changes. 50 renames free, no card.

Joinhappy customers

Mac or Windows?