The quickest way to rename a file
Right-click the file you want to rename, then select Rename from the menu that appears. The file name will highlight and become editable — type the new name and press Enter. That's the fastest method on both Windows and Mac.
If right-clicking doesn't work on your device, you can also click the file once to select it, then press F2 on Windows or Enter on Mac, and the name becomes editable the same way.
Key Takeaways
- Right-click any file and select Rename to change its name in one step, then press Enter when you're done typing.
- The file extension (the part after the dot, like .pdf or .jpg) usually stays the same unless you deliberately change it.
- If you rename a file and it stops opening, you likely changed the extension by mistake — undo the change and keep the extension intact.
- On Mac, you can also select a file and press Enter to rename it; on Windows, press F2 instead.
Understanding file extensions and when not to change them
When you rename a file, the part after the final dot — called the file extension — tells your computer what kind of file it is. A photo might be named "vacation.jpg", where .jpg is the extension. A Word document might be "resume.docx", where .docx is the extension.
When you rename a file using the right-click method, the extension usually stays the same. If you type "my-photo" to replace "vacation", the file becomes "my-photo.jpg" automatically. But if you delete or change the extension by mistake — for example, typing "my-photo.png" when it was originally a .jpg — the file may stop opening in the program you expect.
If this happens, undo the change immediately by pressing Ctrl+Z on Windows or Command+Z on Mac, then rename it again without touching the extension.
Renaming files in Windows File Explorer
Open File Explorer and navigate to the folder containing the file. Right-click the file name and select Rename. The name will highlight in blue, ready for you to type. Type the new name and press Enter.
If you want to rename multiple files at once, select the first file, hold Shift, and click the last file in the group to select them all. Then right-click and choose Rename — Windows will rename the first file, and when you press Enter, it will prompt you to rename the next one in sequence. This is useful if you have a batch of photos or documents that need similar names.
Renaming files on Mac
Open Finder and locate the file. Click it once to select it, then press Enter. The file name becomes editable with a text box around it. Type the new name and press Enter to confirm.
Alternatively, right-click the file and select Rename from the menu. Both methods work the same way. If you have multiple files to rename, you'll need to repeat this process for each one — Mac doesn't have a batch rename feature built into Finder, though you can use the Rename function in Preview if you're renaming photos.
What to do if you can't rename a file
If the Rename option is grayed out or doesn't appear, the file is likely locked or you don't have permission to change it. On Windows, right-click the file, select Properties, and look for a checkbox labeled "Read-only" at the bottom of the window. If it's checked, uncheck it and click Apply, then OK. You should now be able to rename the file.
On Mac, right-click the file and select Get Info. Look for a section called "Sharing & Permissions" at the bottom. Make sure your user account is listed with Read & Write permission, not just "Read Only". If it says "Read Only", click the lock icon at the bottom right, enter your password, and change the permission to "Read & Write".
If the file is on an external drive or network location, you may not have permission to rename it. Try moving the file to your Desktop or Documents folder first, then renaming it there.
Renaming files on your phone or tablet
On an iPhone or iPad, open the Files app, find the file, swipe left on it (or long-press it), and select Rename. Type the new name and tap Done. This works for documents, photos, and other files stored in iCloud Drive or on your device.
On Android, open the Files app or Google Drive, long-press the file, and select Rename. Type the new name and tap the checkmark or OK button. The process is similar across most Android devices, though the exact wording may vary depending on which app you're using.
Organizing files with naming conventions
Renaming files becomes more useful when you use a consistent naming system. Instead of "Document1", "Document2", and "Document3", try names like "2024-Tax-Return", "2024-Insurance-Claim", and "2024-Medical-Records". Starting with the year makes it easy to find files by date when you sort by name.
For photos, consider naming them by date and subject: "2024-01-15-Birthday-Party" tells you when and what the photo is about. For work files, include the project name and version: "Website-Redesign-v2" or "Client-Proposal-Final". This takes a few extra seconds per file but saves time later when you're searching for something specific.
Frequently Asked Questions
Can I rename a file while it's open in a program?
On Windows, you usually can't rename a file while it's open in another program — you'll get an error message saying the file is in use. Close the program first, rename the file, then reopen it. On Mac, you can often rename a file even while it's open, but it's safer to close the program first to avoid confusion.
What happens if I change the file extension?
If you change the extension (the part after the dot), the file may stop opening in the program you expect. For example, changing "photo.jpg" to "photo.png" tells your computer it's a different type of file. If this happens, undo the change immediately with Ctrl+Z or Command+Z and rename it again without changing the extension.
Can I rename a file to have spaces or special characters?
You can use spaces and most special characters in file names, but avoid these symbols: / \ : * ? " < > |. These characters have special meanings in file systems and will cause errors. Hyphens, underscores, and periods are safe to use.
How do I rename a file back to its original name if I forgot what it was?
If you just renamed it, press Ctrl+Z on Windows or Command+Z on Mac to undo the change. If you renamed it a while ago, check your Recycle Bin (Windows) or Trash (Mac) to see if an older version is there. You can also search for files by the date you think you renamed them to narrow down your options.
Can I rename multiple files at once with a pattern?
Windows lets you rename a group of selected files with a pattern — select them all, right-click, choose Rename, type a new name, and press Enter. Windows will rename them "Name (1)", "Name (2)", "Name (3)", and so on. Mac doesn't have this built-in feature, but you can rename files one at a time or use third-party apps designed for batch renaming.