Press F2 to rename the selected file or folder in Windows File Explorer, then type the new name and press Enter. That is the standard shortcut and it works in Windows 10 and Windows 11 alike. On many laptop keyboards you may need Fn+F2 instead, because the function keys double as media and brightness controls. In File Explorer you can also use Alt+H to open the Home tab and then press R to trigger the Rename command from the ribbon. Both routes do the same thing: they put the current name into editable text so you can overwrite it without touching the mouse.
What You'll Need
- A Windows 10 or Windows 11 PC with a working keyboard.
- File Explorer open (press Win+E to launch it) or a file dialog visible on screen.
- One or more files or folders selected in the file list.
- Permission to modify the item. Items inside system folders such as Program Files, or files owned by another account, will refuse the change until permissions are addressed.
Keyboard labels and menu wording can differ slightly by Windows version, device manufacturer and region, so if a key or label does not look exactly as described, look for the nearest equivalent.
Step-by-Step
- Open File Explorer. Press Win+E. You can also click the folder icon on the taskbar. Navigate to the folder containing the item you want to rename.
- Select the item. Click it once with the mouse, or use the arrow keys to move focus onto it. Avoid double-clicking, because that opens the file instead of selecting it. If you opened File Explorer with the keyboard, press Tab until focus reaches the file list, then use the arrow keys.
- Press F2. The current name becomes highlighted text inside an edit box. On many laptops, hold Fn while pressing F2. If your keyboard has a dedicated rename key, that works too.
- Type the new name. Typing replaces the highlighted text entirely. If only part of the name is highlighted, press Ctrl+A first to select all of it. Use the arrow keys to move within the name if you only want to edit part of it.
- Press Enter to confirm. The new name is applied immediately. Pressing Enter is important: clicking elsewhere on the background can also commit the change, but Enter is predictable. If you change your mind, press Esc before confirming and the original name is restored.
- Rename several files at once. Select multiple files with Ctrl+click or Shift+click, or press Ctrl+A to select everything in the folder, then press F2. Windows applies the name you type to the first file and numbers the rest sequentially, for example Holiday (1).jpg, Holiday (2).jpg and so on. Only the base name is editable in this batch mode.
- Rename from the ribbon if F2 is awkward. With the item selected, press Alt+H to open the Home tab of the File Explorer ribbon, then press R. This is useful on keyboards where function keys need Fn or are remapped by the manufacturer's software.
- Rename in a Save or Open dialog. In most Windows programs, F2 also starts a rename of the selected file inside the dialog's file list, so you can tidy names while saving.
Common Mistakes
Pressing F2 with nothing selected. Nothing happens, or Windows beeps. Select an item first. In some layouts F2 with no selection simply does nothing at all, which makes people think the shortcut is broken.
Forgetting the Fn key on laptops. If pressing F2 dims the screen or adjusts volume, your function keys are in media mode. Hold Fn and press F2, or look for a Fn Lock key combination on your keyboard to swap the row back to standard function keys.
Changing only the extension. Windows hides file extensions by default, so renaming a file carefully can still break the association if you accidentally delete the part after the dot. In File Explorer, open the View menu and turn on File name extensions so you can see what you are editing. Keeping the extension intact is the safe habit.
Using characters Windows does not allow. A name cannot contain any of these: \ / : * ? " < > |. Windows shows an error and refuses to apply the name. Trailing spaces or a trailing period are also rejected.
Assuming batch rename renames each file individually. Selecting ten files and pressing F2 gives you one base name plus numbers, not ten separate names. Rename the files one at a time if each needs a distinct name.
Renaming a file that is open and in use. If a program has the file locked, Windows shows an error saying the action cannot be completed because the file is open. Close the program and try again.
Tips
Press Tab during a rename to commit the current name and move straight to renaming the next item, which makes cleaning up a long folder much quicker than selecting each file individually.
Use Ctrl+A inside the edit box to select the whole name including the extension if extensions are visible. This avoids the classic mistake of leaving a stray character behind.
Batch numbering always follows the order in which the files were selected, so select in the order you want them numbered, or sort the folder first and then press Ctrl+A.
If you rename the wrong item, press Ctrl+Z immediately to undo the rename. This is faster and safer than retyping the old name, which is easy to get wrong.
F2 is not limited to File Explorer. It renames items in most Windows file dialogs, and in many programs it renames tabs, sheets, layers or playlists, though this varies by application.
Troubleshooting
F2 does nothing. First check that an item is actually selected and that the File Explorer window has focus; click once on the file list. If it still fails, test the function key: open Notepad and press F2. If nothing types and no media action occurs, the key may be disabled in the manufacturer's keyboard software or the keyboard itself. Try the ribbon route, Alt+H then R, to confirm the rename feature itself works.
The name reverts or an error appears. Read the error text. It usually says the file is open in another program, that you need permission from the owner, or that the name is invalid. Close any program using the file; for permission problems, check whether the item sits in a protected system location such as Program Files or Windows. Renaming files there is generally not advisable, and changing ownership is a job for someone who knows the system.
You cannot rename a folder or file because it is in use. Restart the PC, which releases file locks, then rename before opening anything. Syncing tools such as cloud storage clients can also lock files while they upload; wait for syncing to finish.
The extension disappeared and the file no longer opens. You removed the extension. Rename it back, adding the correct extension after the dot, or use Ctrl+Z to undo. If the file type is now unknown to Windows, you need to restore the original extension exactly, so check the name carefully before confirming.
Keyboard shortcuts behave strangely after installing new software. Some tools remap keys for gaming or accessibility. Check the remapping tool's settings and restore default key bindings, or disable the tool temporarily to test.
Frequently Asked Questions
What is the rename shortcut in Windows?
F2 is the standard rename shortcut in File Explorer. Fn+F2 on laptops whose function row defaults to media keys. The ribbon alternative is Alt+H then R.
Why does F2 not work on my laptop?
The function keys are usually set to media and brightness actions. Hold Fn while pressing F2, or enable Fn Lock using the combination printed on your keyboard, which is often Fn+Esc or Fn+the key with a lock icon.
Can I rename several files at the same time with the keyboard?
Yes. Select the files, press F2, type one base name and press Enter. Windows adds numbers in brackets to keep each name unique.
Is there a shortcut to rename a file without the extension changing?
Windows highlights only the base name by default when extensions are hidden, so typing keeps the extension intact. If you have turned on file name extensions, press the Right arrow after F2 to move the cursor to the end of the base name, or select only the part you want to change.
How do I undo a rename?
Press Ctrl+Z in File Explorer right away. Windows keeps a list of recent file operations you can step back through.
Does F2 work in Windows 11 the same way?
Yes. F2, the ribbon command and batch renaming all work in Windows 11 File Explorer as they do in Windows 10, though ribbon and context menu wording can vary slightly between versions.