To rename a file in Windows 11 without using the mouse, select it in File Explorer and press F2. The file's current name is highlighted and ready to type; type the new name and press Enter to confirm or Esc to cancel. On most laptops you may need to hold Fn while pressing F2 because the top row of keys is assigned to media and brightness by default. F2 is the fastest shortcut, but Windows 11 also accepts a few alternatives if your keyboard layout behaves differently.
What You'll Need
- A PC running Windows 11 with File Explorer available (it is built in and cannot be removed).
- A standard keyboard, or a laptop keyboard where you know whether F-keys need the Fn modifier.
- Permission to modify the file: files inside your own folders (Desktop, Documents, Downloads, Pictures) are usually fine, but files in system folders such as Program Files are protected.
- If you only want to change the extension (the part after the dot, like .txt or .jpg), File Explorer must be set to show file extensions first, otherwise you will rename only the base name.
Step-by-Step
- Open File Explorer. Press Win + E to open a File Explorer window. This is the quickest way from anywhere in Windows and works even if no window is open. You can also click the folder icon on the taskbar.
- Navigate to the file. Use the address bar, the left-hand navigation pane, or type the folder path. If you know the exact location you can paste it into the address bar and press Enter.
- Select the file with the keyboard. Use the arrow keys to move through the list, or start typing the file's name to jump to it. If you are already using the mouse, a single click also selects the file without renaming it.
- Press F2. The file name becomes an editable text box with the current name selected. Do not double-click the name, since that opens the file instead of renaming it.
- Type the new name. Typing replaces the old name entirely because it is pre-selected. If you want to edit only part of the name, press the Right arrow key first to move the cursor to the end and deselect the text, then use arrows and Backspace to make changes.
- Leave the extension alone unless you mean to change it. The part after the final dot is usually not selected when a file extension is shown. If it is included and you type over it, the file may no longer open with the right app. Press Enter only after checking the ending is correct.
- Confirm with Enter. Press Enter to save the new name. Pressing Esc instead cancels the rename and restores the old name.
- Watch for an error message. Windows will refuse the rename if another file in the same folder already has that name, or if you tried to name it with characters like \ / : * ? " < > | which are not allowed in file names. Change the name and press Enter again.
Common Mistakes
Double-clicking the file name instead of pressing F2. In File Explorer, a slow double-click on a selected file's name also enters rename mode, but a normal double-click opens the file. If a program opens, close it and use F2 next time.
Forgetting the Fn key on laptops. On many compact keyboards the F2 key is shared with a media or brightness function. Holding Fn and pressing F2 sends the rename command. Some laptops have an Fn Lock you can toggle to make the function keys behave normally.
Renaming the extension by accident. If "file name extensions" are visible, typing over the whole name can wipe out the .docx or .jpg ending, and Windows will then treat the file as a different type. Keep the extension unless you are deliberately converting the file.
Using illegal characters. Windows blocks certain symbols and also trailing spaces and periods in names. If Enter seems to do nothing or a dialog appears, look at the name for these characters.
Trying to rename protected system files. Files in Windows, Program Files, or the root of the system drive may be locked or require administrator approval. File Explorer will show a prompt or deny the change.
Tips
To rename several files at once, select them with the arrow keys while holding Shift (for a range) or Ctrl (for individual files), then press F2 and type one name. Windows adds a number in brackets, such as Photo (1), Photo (2), and keeps the original extensions. This is the built-in batch rename and needs no extra software.
For a more keyboard-friendly approach, after selecting a file press the Menu key (the key with a menu icon, usually between the right Ctrl and Alt keys, on full-size keyboards) or Shift + F10 to open the context menu, then choose Rename. This is useful on keyboards where the F-row is hard to reach. On a laptop without those keys, use the generic context menu approach: right-click the selected file and pick Rename.
Menus and keyboard layouts can differ slightly by Windows version, device manufacturer and region, so if F2 does nothing, try Fn + F2 before changing any settings.
Troubleshooting
F2 opens something else. This almost always means Fn Lock is off or the key is assigned to a function. Hold Fn while pressing F2. If that works, look for an Fn Lock feature on your keyboard, often activated with Fn + Esc, though the exact combination varies by maker.
The name box appears but typing does nothing. Make sure the window has focus and the name is actually selected. Press Esc, click once on the file, then press F2 again.
You get an "Access is denied" error. The file may be open in another program or stored in a protected location. Close any app using it and try again. For files locked by the system, check that you are allowed to modify them; do not change ownership of system files unless you understand the risk.
The rename option is greyed out. This happens for files on a network share without write permission, or in read-only folders. Confirm with the folder owner or the account that manages the share.
The file no longer opens after renaming. You likely changed or removed the extension. Press F2 again and restore the correct ending, including the dot. If you are unsure of the original, look for the file type shown in the Details pane or in the Type column.
You want the extension visible. In File Explorer, open the View menu and look for a setting named "Show" and then the option for file name extensions. Exact wording can differ by version, so scan the View menu's Show submenu for the extensions entry.
Frequently Asked Questions
What is the shortcut to rename a file in Windows 11?
The standard shortcut is F2. On laptops where the function row is mapped to other actions, use Fn + F2.
Can I rename a file without a mouse?
Yes. Select the file with the arrow keys or by typing its name, press F2, type the new name, and press Enter. Everything can be done from the keyboard.
How do I rename several files at the same time?
Select the files, press F2, type one name, and press Enter. Windows appends a number to each file and keeps their extensions.
Why does F2 not rename on my laptop?
The key is probably assigned to a media or brightness action. Hold Fn while pressing F2, or enable Fn Lock if your keyboard supports it.
Can I undo a rename?
Yes, immediately after renaming press Ctrl + Z to undo. If you have done other actions since, rename it back manually with F2.
Why can't I change the file extension?
Extensions are hidden by default in File Explorer. Turn on the file name extensions option in the View menu, then rename carefully, keeping the correct ending.