The fastest way to rename a file

Right-click the file and select Rename from the menu. Type the new name and press Enter. That is the standard method on Windows, Mac, and Linux — it works for documents, photos, videos, and any other file type.

On Windows, you can also click the file once to select it, then press F2 to open the rename field directly. On Mac, select the file and press Enter to edit the name in place. Both shortcuts skip the right-click step if you prefer keyboard navigation.

The file extension — the letters after the final dot, like .pdf or .jpg — usually stays the same unless you deliberately change it. Changing the extension can break the file, so leave it alone unless you have a specific reason to alter it.

Key Takeaways

  • Right-click any file and select Rename to change its name in one step; press Enter when done.
  • Windows users can press F2 after selecting a file to rename it without right-clicking; Mac users press Enter.
  • The file extension (the part after the dot) should stay the same unless you are deliberately converting the file type.
  • Renaming a file does not move it to a different folder or change what is inside it — only the name on disk changes.

Renaming files in bulk

If you need to rename many files at once, most operating systems have built-in batch rename tools. On Windows 10 and later, select multiple files in File Explorer, right-click, and choose Rename — Windows will rename the first file and add a number in parentheses to each subsequent file (for example, Photo (1), Photo (2), Photo (3)).

On Mac, select the files you want to rename, right-click, and choose Rename Items. A dialog box opens where you can choose to replace text, add text before or after the current name, or change the file format. This is faster than renaming files one at a time.

Linux file managers vary by desktop environment, but most allow you to select multiple files and rename them through a context menu or keyboard shortcut. If your file manager does not have this feature, you can use the command line with tools like rename or mv, though that requires typing commands rather than clicking.

When renaming breaks a file

Changing the file extension can prevent the file from opening. If you rename a photo from photo.jpg to photo.txt, your computer no longer recognizes it as an image file, and image programs will not open it. The photo data is still there, but the system does not know what to do with it.

You can fix this by renaming it back to the original extension. If you accidentally changed the extension and cannot remember what it was, look at the file properties or right-click and select Open with to see what programs can read it — that often tells you the correct type.

Renaming a file does not change anything inside it. A Word document renamed from report.docx to report.pdf is still a Word document; it just has the wrong label. The file will not actually become a PDF unless you use a conversion tool.

Renaming files with special characters

Most operating systems allow letters, numbers, spaces, hyphens, and underscores in file names. Characters like asterisks (*), question marks (?), forward slashes (/), and backslashes (\) are reserved by the system and will cause an error if you try to use them.

On Windows, you also cannot use these characters in file names: < > : " | ? *. If you try to type one of these, Windows will show an error message and prevent you from saving the name. On Mac and Linux, the restrictions are looser, but forward slashes are still forbidden because the system uses them to separate folder paths.

If you need to separate words in a file name, use hyphens (my-document) or underscores (my_document) instead. Both are widely supported and make file names easier to read.

Renaming files in cloud storage

Files stored in cloud services like Google Drive, OneDrive, or Dropbox can be renamed the same way as local files — right-click and select Rename. The change syncs to the cloud automatically, and anyone with a link to the file will see the new name.

If you rename a file that is shared with others, they will see the new name the next time they refresh their view. The file itself does not move or change; only the name updates. If someone has the file downloaded to their computer, their local copy keeps the old name until they manually sync or re-download it.

Be careful when renaming files that are part of a shared folder or project. If other people or programs rely on the old file name, changing it might break links or cause confusion. It is often worth sending a quick message to collaborators before renaming shared files.

Renaming files through file properties

Another way to rename a file is through its properties or information panel. On Windows, right-click the file, select Properties, and look for a File name field at the top. You can edit it there and click Apply to save the change.

On Mac, right-click the file and select Get Info. At the top of the window, you will see the file name field. Click it, type the new name, and press Enter. This method is slower than the right-click Rename option, but it also shows you other information about the file, like its size and creation date.

The properties method is useful when you want to see file details at the same time you are renaming. For a quick rename, the right-click menu is faster.

Renaming files you cannot edit

If you cannot rename a file, it is usually because another program has it open. Close the program using the file, then try renaming again. On Windows, if a file is locked by a process you cannot identify, restart your computer — this releases all file locks.

You may also lack permission to rename the file. On Windows, right-click the file, select Properties, go to the Security tab, and check whether your user account has write permission. On Mac, right-click, select Get Info, scroll to Sharing & Permissions, and make sure your account is set to Read & Write.

System files and files in protected folders (like Windows System32) cannot be renamed without administrator access. If you need to rename one of these, right-click and select Run as administrator on Windows, or use the sudo command on Mac and Linux.

Frequently Asked Questions

Does renaming a file change what is inside it?

No. Renaming only changes the label on the file, not the data stored in it. A Word document renamed to have a .txt extension is still a Word document inside — it just has the wrong label, and programs may not recognize it.

Can I rename a file while it is open?

On Mac and Linux, yes. On Windows, it depends on the program. Some programs lock files while they are open, preventing renaming. Close the file in the program first, then rename it. You can rename it back if needed.

What happens if I rename a file to remove the extension?

The file will still work, but your computer may not know what program to use to open it. Right-click the file and select Open with to choose a program manually, or rename it back to include the extension.

Can I undo a rename if I made a mistake?

Press Ctrl+Z (Windows) or Command+Z (Mac) immediately after renaming to undo the change. If you have already closed the file manager, you may need to rename it manually back to the original name.

Why does Windows add numbers when I rename multiple files?

Windows uses the numbers to keep each file name unique. If you rename five files to "Photo", Windows saves them as Photo (1), Photo (2), Photo (3), and so on. You can edit each name afterward if you want different names.