Previous 1 of 3

On Windows 10, the process to rename a single file is easy, but it can quickly become troublesome when trying to change the name (or extension) to a long list of files within a folder.

You can always install third-party tools to ease the process, but Windows 10 includes various tools to quickly change the name of files using File Explorer as well as using Command Prompt and PowerShell.

In this Windows 10 guide, we'll walk you through three ways to rename multiple files, including changing the extension, without the need to resource to third-party tools.

How to rename multiple files using File Explorer

While you can choose from multiple methods to rename files, using File Explorer is perhaps the easiest way to accomplish the task.

Renaming multiple files one at a time

To quickly rename multiple files with different names using the "Tab" key, use these steps:

  1. Open File Explorer.
  2. Locate the folder with the files to rename.
  3. Click the View tab.
  4. Select the Details view.

  5. Select the first file in the folder.
  6. Click the Home tab.
  7. Click the Rename button.

    Quick tip: You can also press the F2 button, right-click the files and select the Rename option, or click the file once and slowly click the file name again to trigger the rename action.

  8. Type the new file name.
  9. Press the Tab key to jump to trigger the rename action for the next file on the list.
  10. Type the new file name.
  11. Press the Tab key again to jump to trigger the next rename.

Renaming multiple files at once

To rename multiple files in bulk with the same name structure, use these steps:

  1. Open File Explorer.
  2. Locate the folder with the files to rename.
  3. Click the View tab.
  4. Select the Details view.

  5. Click the Home tab.
  6. Click the Select all button.

    Quick tip: You can also use the Ctrl + A keyboard shortcut to quickly select all files. You can press and hold the Ctrl key and then click with the mouse the files to rename. Or you can even choose the first file, press and hold the Shift key, and then click the last file to select a group.

  7. Click the Rename button.
  8. Type the new file name and press Enter.

Once you complete the steps, all the selected files will be renamed using the same scheme. However, you'll notice that they will use a different number between parentheses. For example, summer_trip_2019 (1).jpg and summer_trip_2019 (2).jpg.

If you made a mistake, you could use the Ctrl + Z keyboard shortcut to undo the changes. Alternatively, you can click the menu button from the top-left corner (on the title bar of File Explorer), and select the Undo option.

Previous 1 of 3
2 of 3

How to rename multiple files using Command Prompt

If you're comfortable using commands, you can use Command Prompt to change the name of one or multiple files in bulk.

Renaming single file

To rename one file with Command Prompt, use these steps:

  1. Open Start.
  2. Search for Command Prompt and click the top result to open the app.
  3. Navigate to the folder with the files to rename.

    This example opens the "Documents" folder:

    cd %USERPROFILE%\Documents

  4. Type the following command to rename a file and press Enter:

    ren "OLD-FILE-NAME.EXTENSION" "NEW-FILENAME.EXTENSION"

    In the command, the quotation marks are only required if the name includes spaces.

    This example rename the file to "summer_trip_2019_notes.txt":

    ren "s_trip_19_notes.txt" "summer_trip_2019_notes.txt"

Renaming multiple files

To rename multiple files in bulk with the same name structure with Command Prompt, use these steps:

  1. Open Start.
  2. Search for Command Prompt and click the top result to open the app.
  3. Navigate to the folder with the files to rename.
  4. Type the following command to rename multiple files in bulk and press Enter:

    ren *.FILE-EXTENSION ???-FILE-NAME.*

    In the command, the asterisk (*) is a wildcard that specifies the ren command to rename everything with a ".jpg" extension. The question mark (?) is also a wildcard, but it represents a character of the original file name.

    This example renames all ".jpg" files leaving the first three characters (which works as a unique identifier to avoid duplication) and appends "-hikingTrails" to the name:

    ren *.jpg ???-hikingTrails.*

Trimming multiple file names

To make long file names shorter with Command Prompt, use these steps:

  1. Open Start.
  2. Search for Command Prompt and click the top result to open the app.
  3. Navigate to the folder with the files to rename.
  4. Type the following command to make file names shorter and press Enter:

    ren *.* CHARACTER-COUNT.*

    In the command, the asterisk (*) matches all the file names and extensions in the folder, and the question marks (?) indicates how many characters to use for the new file name.

    This example trims the file names longer than five characters:

    ren *.* ?????.*

    If the file name is less than five characters, then the name will not change. (If you want to make the file name longer add extra question marks.)

Modifying multiple file names

To rename part of the file name on similar files, use these steps:

  1. Open Start.
  2. Search for Command Prompt and click the top result to open the app.
  3. Navigate to the folder with the files to rename.
  4. Type the following command to rename part of file name and press Enter:

    ren OLD-FILE-NAME-PART*.* NEW-FILENAME-PART*.*

    This example renames names files start with "summer_trip_2019" to "vacation_2019_":

    ren summer_trip_2019*.* vacation_2019_*.*

Changing file extension

To change the file extension to another compatible extension, use these steps:

  1. Open Start.
  2. Search for Command Prompt and click the top result to open the app.
  3. Navigate to the folder with the files to rename.
  4. Type the following command to change the file extension and press Enter:

    ren *.OLD-EXTENSION *.NEW-EXTENSION

    This example changes the extension from ".txt" to ".doc" compatible with Microsoft Word for the files in the folder:

    ren *.txt *.doc

    This example changes only extension of a single file from ".txt" to ".doc":

    ren beach_trip_notes.txt beach_trip_notes.doc

Renaming specific extension file names

The instructions outlined above will rename every file within the location. However, if you want to rename only a group of files with a particular format, you need to omit the asterisk (*) and specify the target extension in the command.

To rename files with a specific file extension, use these steps:

  1. Open Start.
  2. Search for Command Prompt and click the top result to open the app.
  3. Navigate to the folder with the files to rename.
  4. Type the following command to change the extension for a group of files and press Enter:

    ren FILE-NAME*.EXTENSION FILE-NAME*.EXTENSION

    This example only renames images with a ".jpg" extension:

    ren vacation_2019_*.jpg summer_trip_2019*.jpg

After you complete the steps, Command Prompt will rename the files using the settings that you specified in the command.

2 of 3
3 of 3 Next

How to rename multiple files using PowerShell

On Windows 10, PowerShell is a powerful scripting tool, which similar to Command Prompt, allows you to rename files virtually any way you want. These instructions, we'll walk you through the most common scenarios to rename one as well as various files at once.

Renaming single file

To rename a single file using PowerShell, use these steps:

  1. Open Start.
  2. Search for PowerShell and click the top result to open the app.
  3. Navigate to the folder with the files to rename.

    This example opens the "Documents" folder:

    cd Documents

  4. Type the following command to change the name of a single file and press Enter:

    Rename-Item "OLD-FILE-NAME.EXTENSION" "NEW-FILE-NAME.EXTENSION"

    In the command, the quotation marks are only required if the name includes spaces.

    This example renames the file to "beach_trip_notes.txt":

    Rename-Item "surfing_trip_notes.txt" "beach_trip_notes.txt"

Renaming multiple files in bulk

To rename multiple files in bulk when the name structure isn't important, use these steps:

  1. Open Start.
  2. Search for PowerShell and click the top result to open the app.
  3. Navigate to the folder with the files to rename.
  4. Type the following command to rename multiple files in bulk and press Enter:

    Dir | %{Rename-Item $_ -NewName ("NEW-FILE-NAME{0}.EXTENSION" -f $nr++)}

    This example renames images with a ".jpg" extension using the same ("beach_trip_2019") naming scheme and appends a different number at the end of the name:

    Dir | %{Rename-Item $_ -NewName ("beach_trip_2019{0}.jpg" -f $nr++)}

Trimming multiple file names

To make file names shorter, or trim part of the names by an N number of characters, use these steps:

  1. Open Start.
  2. Search for PowerShell and click the top result to open the app.
  3. Navigate to the folder with the files to rename.
  4. Type the following command to rename files using shorter names and press Enter:

    Dir | Rename-Item -NewName {$_.name.substring(0,$_.BaseName.length-N) + $_.Extension}

    In the command update "$_.BaseName.length-N" by changing the value of "N" to specify the number of characters that you want to remove.

    This example will trim the name of your files by eight characters:

    Dir | Rename-Item -NewName {$_.name.substring(0,$_.BaseName.length-8) + $_.Extension}

Deleting part of the name from multiple files

To remove part of the file name on multiple files with PowerShell, use these steps:

  1. Open Start.
  2. Search for PowerShell and click the top result to open the app.
  3. Navigate to the folder with the files to rename.
  4. Type the following command to remove part of the file name and press Enter:

    Dir | Rename-Item -NewName {$_.name -replace "OLD-FILE-NAME-PART",""}

    This example removes the word "trip" from the name of all files in the folder:

    Dir | Rename-Item -NewName {$_.name -replace "trip",""}

Replacing part of the name from multiple files

To rename the same part of the file name on similar files, use these steps:

  1. Open Start.
  2. Search for PowerShell and click the top result to open the app.
  3. Navigate to the folder with the files to rename.
  4. Type the following command to replace part of file name and press Enter:

    Dir | Rename-Item -NewName {$_.name -replace "OLD-FILE-NAME-PART,"NEW-FILE-NAME-PART"}

    This example replaces the word "beach_" for "surfing_trip" of all the files that contain the word "tower" as part of the file name:

    Dir | Rename-Item -NewName {$_.name -replace "beach_","surfing_trip"}

Removing spaces from multiple files

Spaces on file names can sometimes cause problems, especially when using a command terminal. If you have files using spaces in the title, you can modify the name to include a visual separator, such as dash or underscore symbol.

To remove and replace spaces with underscores, use these steps:

  1. Open Start.
  2. Search for PowerShell and click the top result to open the app.
  3. Navigate to the folder with the files to rename.
  4. Type the following command to remove spaces from file name and press Enter:

    Dir | Rename-Item -NewName { $_.Name -replace "SPACE","SEPARATOR" }

    This example replaces spaces with underscores in all files:

    Dir | Rename-Item -NewName { $_.Name -replace " ","_" }

Changing file extension

To change the file extension for a bunch of files with PowerShell, use these steps:

  1. Open Start.
  2. Search for PowerShell and click the top result to open the app.
  3. Navigate to the folder with the files to rename.
  4. Type the following command to change the extension on files and press Enter:

    Dir | Rename-Item -NewName { [io.path]::ChangeExtension($_.name, "NEW-EXTENSION") }

    This example changes any file extension to ".doc":

    Dir | Rename-Item -NewName { [io.path]::ChangeExtension($_.name, "doc") }

Renaming specific extension file names

The instructions outlined above will rename every file within the location. However, if you want to rename a particular file format, such as documents, images, or videos, then you can use the "-filter" option.

To change the names of a specific file format, use these steps:

  1. Open Start.
  2. Search for PowerShell and click the top result to open the app.
  3. Navigate to the folder with the files to rename.
  4. Type the following command to rename files with a specific extension and press Enter:

    Dir -filter *.EXTENSION | %{Rename-Item $_ -NewName ("NEW-FILE-NAME{0}.EXTENSION" -f $nr++)}

    This example renames only files that include the ".jpg" extension:

    Dir -filter *.jpg | %{Rename-Item $_ -NewName ("beach_trip_{0}.jpg" -f $nr++)}

Once you complete the steps, PowerShell will rename the files of a specific extension using the name that you specified in the command.

Although these commands have been tested to work correctly, it's always recommended that you perform a test run before trying to rename the original files.

More Windows 10 resources

For more helpful articles, coverage, and answers to common questions about Windows 10, visit the following resources:

3 of 3 Next