The fastest way to rename a file

Right-click the file and select Rename from the menu that appears. Type the new name and press Enter. That is the method on Windows, Mac, and Linux — it works the same way on all three.

If right-clicking does not show a Rename option, your system may be set to a different menu style. On some Linux desktops you may need to click a menu button instead, or press F2 while the file is selected. On Mac, you can also click the file once to select it, wait a moment, then click the name again to edit it directly.

The file keeps its type — a .jpg stays a .jpg, a .docx stays a .docx. You are only changing the part before the dot. If you accidentally delete the dot and the type letters, the file may stop opening in the right program, so be careful not to remove that part.

Key Takeaways

  • Right-click any file and select Rename to change its name in one step on Windows, Mac, or Linux.
  • Keep the file type letters after the dot — removing .jpg or .docx will break the file's connection to the program that opens it.
  • You can rename files in bulk by selecting multiple files at once, though the method varies by operating system.
  • Renaming a file does not move it to a different folder or change when it was created — it only changes the name you see.

Renaming multiple files at once

On Windows 10 and 11, select all the files you want to rename by clicking the first one, holding Shift, and clicking the last one. Then right-click and select Rename. Type a new name and press Enter — Windows will automatically number them (like "Photo 1", "Photo 2", "Photo 3") if you selected more than one.

On Mac, select multiple files by clicking the first one, then holding Command and clicking each additional file. Right-click and choose Rename Items. A dialog box will appear where you can choose to replace text, add text before or after the current name, or change the file type. This method is more flexible than Windows because you can see all your changes before explore them.

On Linux, the rename method depends on which desktop you are using. GNOME (the most common) does not have a built-in bulk rename. You can select multiple files and press F2, but you will rename them one at a time. If you need to rename many files at once on Linux, a file manager like Thunar or Nemo has a bulk rename feature built in.

Renaming files in File Explorer or Finder

Open File Explorer on Windows or Finder on Mac and navigate to the folder holding the file. Click once on the file to select it, then press F2 on Windows or Enter on Mac. The file name will become editable — type the new name and press Enter again.

This method is slower than right-clicking for a single file, but it is useful if you are already browsing folders and want to rename as you go. Some people find it easier than the right-click menu because the name field is already highlighted and ready to type.

On Mac Finder, you can also click the file once to select it, wait about one second, then click the name text itself. The name will become editable without needing to press Enter first. This works best if you are patient with the timing — click too fast and you will just select the file again.

What happens when you rename a file

Renaming changes only the name you see — it does not move the file, change its contents, or alter when it was created. The file stays in the same folder, opens in the same program, and works exactly as before. The creation date and modification date stay the same.

If you rename a file while a program has it open, the program may not notice the change right away. Close the program and reopen the file to be sure it loads correctly. Some programs (like Microsoft Word or Google Docs) may show an error if you rename a file while it is open, but the rename usually completes anyway.

You can rename a file as many times as you want. There is no limit to how many times you can change the name, and each rename does not affect the file itself — only the label you see in your file manager.

File name rules and what you cannot do

On Windows, you cannot use these characters in a file name: < > : " / \ | ? *. You also cannot name a file with certain reserved words like CON, PRN, AUX, or NUL, even with a file type added (so you cannot name something "CON.txt"). Windows will show an error if you try.

On Mac and Linux, you can use almost any character except the forward slash /, which is reserved for folder paths. You can use colons, asterisks, and other symbols that Windows blocks. Both systems are case-sensitive, so "Photo.jpg" and "photo.jpg" are two different files.

File names can be very long — Windows allows up to 255 characters, Mac allows 255 bytes (which is usually around 100 characters depending on the language), and Linux allows 255 bytes as well. In practice, keeping names shorter than 50 characters makes them easier to read and less likely to cause problems when you move files between systems.

Renaming files with special characters or spaces

Spaces in file names work fine on all systems. "My Document.docx" and "MyDocument.docx" are both valid. Spaces do not break anything, though some people avoid them because older programs sometimes had trouble with them. That is rarely a problem now.

Special characters like hyphens, underscores, and periods (other than the one before the file type) are safe to use. "2024-Budget_Final.xlsx" works on all systems. Avoid the characters listed above for Windows, and avoid the forward slash on all systems.

If you copy a file from Mac or Linux to Windows, or vice versa, a file name with characters that one system does not allow may cause problems. For example, a Mac file named "Report: Q1.docx" cannot be copied to Windows because Windows does not allow colons. If this happens, rename the file on the original system before moving it.

Undoing a rename if you made a mistake

If you renamed a file and when ready realized you made a mistake, press Ctrl+Z on Windows or Linux, or Command+Z on Mac. This will undo the rename and restore the old name. This works only if you have not closed the file manager or done other actions since the rename.

If you closed the file manager or performed other actions, the undo will not work. At that point, you will need to rename the file again to the correct name. There is no "rename history" that lets you see all the names a file has had.

If you cannot remember what the file was originally named, look at the file's properties or details. Right-click the file and select Properties (Windows) or Get Info (Mac). The creation date and file size might help you figure out which file it is, but the original name will not be listed there.

Frequently Asked Questions

Can I rename a file while it is open in a program?

You can rename it, but the program may not notice the change until you close and reopen the file. Some programs will show an error message, but the rename usually completes anyway. To be safe, close the program first, rename the file, then reopen it.

What if I accidentally deleted the file type when renaming?

The file will not open in the correct program anymore. Right-click the file, select Rename, and add the file type back. For example, if you renamed "Photo.jpg" to "Photo", change it back to "Photo.jpg". The file itself is not damaged — it just needs the type label restored.

Can I rename a file to have no name, just the file type?

On Windows, you cannot create a file with no name — the system will reject it. On Mac and Linux, you can name a file ".jpg" with nothing before the dot, but most file managers will hide it because it looks like a hidden system file. It is not a good idea.

Does renaming a file change its size or contents?

No. Renaming changes only the label you see in your file manager. The file size, creation date, and everything inside the file stays exactly the same. You can verify this by right-clicking the file and checking its properties before and after the rename.

What is the difference between renaming and saving as?

Renaming changes the file name on disk. Saving as (in programs like Word or Photoshop) creates a new file with a new name and closes the old one. If you rename a file while a program has it open, the program is still working with the old name. Use Save As inside the program if you want to change the name and keep working in that program.