How to Rename a File on Windows 11

Share
In this tutorial, we'll learn how to rename files on Windows 11. If you created or saved a new file with the wrong name, you can use this technique to correct the name of the file.

.To rename a file on Windows 11, follow the following steps:

1: open the File Explorer and navigate to the location where the file you want to rename is found.

2: right click on the icon that represents the file to display the file's context menu.

The main window of File Explorer displaying a file with a mouse cursor hovering over it. A context menu is also shown, its items are: Cut, Copy, Rename, Share, Delete, Open, Open With, Share, Add to favorites, Compress to..., Copy as path, Properties, Edit in Notepad, Edit in Notepad++, Show more options.
A context menu that appears when you right click on a file in Windows 11's File Explorer.

3: click on the option "Rename" in the context menu. This option used to be a normal item in previous versions of Windows, but in Windows 11, "Rename" is a button at the top of the context menu where you can find Cut, Copy, Rename, Share, and Delete. I don't know why they changed it.

4: the appearance of the file's label will change to indicate that you can edit it. While changed, pressing letters on the keyboard will start typing a new name for the file. You can also use typical text-editing functionality, such as:

  • The Backspace key to erase a character behind the text cursor.
  • Arrow keys to move the text cursor.
  • Shift+Arrow keys to select parts of the text.
  • Ctrl+Arrow keys to make the cursor jump from one word to another.
  • The Delete key to delete the selected text. Warning: this key will attempt to delete the file if you aren't currently renaming it!
  • Ctrl+C to copy the selected text.
  • Ctrl+V to paste text into the name.

5: the file won't be renamed until you finish editing its name. To finish editing, there are multiple methods.

First, you can click on an empty space in the main pane of the File Explorer or in another icon. Doing this will remove the keyboard focus from the file, and when it loses the keyboard focus, the new name will be applied. There other ways to lose keyboard focus, e.g. if you press Tab, or Alt+Tab, or click on another window. All of these will apply the new name.

Second, you can press the Enter key to apply the name.

When the new name is applied, Windows will check if the new name is a valid name. This means that you can type an invalid name while renaming a file, but when you finish renaming the file, the name must be a valid name.

For example, two files in the same folder can't have the exact same filename. This is a bit complicated because Windows doesn't actually display the whole filename of a file by default. Filenames have a thing at the end called the file extension. For plain text files, this extension would be .txt. So if I name my file To do, its actual filename is To do.txt, but Windows doesn't display the .txt part by default.

This means you can't have two files of the same type with the same name in the same folder. But you could have an image file and a text file with the same name. Because the filename of the image file would be something like To do.png, if it's a PNG image, which is different from To do.txt.

Tips

Renaming a File Without using the Mouse

To rename a file without using the mouse, first select the file using the keyboard, then press the F2 key to rename it. To select files using the keyboard, use the arrow keys to move the selection around, the Enter key to enter folders, and Alt+Up Arrow to navigate to the parent folder.

Cancelling the Rename

You can cancel renaming a file by pressing the Esc key while renaming it or by giving it a completely empty name. Empty names aren't valid filenames, so if you erase its whole name and press the Enter key, Windows will simply do nothing, and the old name will stay as-is.

Undoing the Rename

It's possible to undo the renaming of a file if you renamed it wrong. To do this, press Ctrl+Z after you have renamed the file. Note that Ctrl+Z will undo all sorts of operations performed within File Explorer. So, for example, if you have renamed a file, and then moved a different file into a folder, Ctrl+Z will un-move the file first, and you will have to press it again to undo the renaming that occurred previously.

To undo the undo (redo), press Ctrl+Y.

Renaming Multiple Files at Once

It's possible to rename multiple files at once. To do this, first select multiple files by holding the Ctrl key or the Shift key while clicking on the files that you want to rename. Then, right click on a selected file and choose the rename option or press F2. After you type a name, all files will be renamed to the same name, but since two files can't have exactly the same name, Windows will add to the end of each file's name a number like (1), (2), (3) and so on to distinguish them. You can undo this by pressing Ctrl+Z.

Renaming the Extension

If you change the extension of a file while renaming it, Windows may warn you that this will make the file unusable. This isn't true. Windows simply won't be able to figure out what application is supposed to open it if it has the wrong extension. You can fix this by giving it its original extension back.

The problem is that in this case you need to remember what extension the file had before you changed it. In some cases, you may forget about it, so you won't be able to make the file work like it did again.

Forbidden File Names

On old versions of Windows, it wasn't possible to change the name of a file such that it started with a dot (.), i.e. so it looked like the whole file was just its extension. On Windows 11, this is possible. The reason why something like this is necessary is that, on Linux, files that start with dots (called dotfiles) are often used as configuration files. Programs that work both on Linux and Windows could require these on Windows and users would have no way to create those files through the File Explorer. An example is the .gitignore file used by the git program.

Video

Written by Noel Santos.

About the Author

I'm a self-taught Brazilian programmer graduated in IT from a FATEC. In a world of increasingly complex and essential computers, I decided to use my technical expertise in hardware, desktop applications, and web technologies to create an informative resource to make PC's easier to understand.

View Comments