Previous 1 of 3

Windows 10 rename multiple filesSource: Windows Central

On Windows 10, renaming a single file is straightforward, but the problem arises when you need to change the name or extension to a long list of files in a particular folder location.

Although you can always use third-party tools (including Microsoft PowerToys) to speed up the process, Windows 10 ships with several ways to make it easier to change the name of files using File Explorer, PowerShell, and Command Prompt.

In this Windows 10 guide, we will 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

If you want to rename one or multiple files on Windows 10, File Explorer provides the quickest methods.

VPN Deals: Lifetime license for $16, monthly plans at $1 & more

Rename multiple files one at a time

To rename multiple files with the "Tab" key, use these steps:

  1. Open File Explorer.

    Quick tip: You can quickly open File Explorer with the icon in the taskbar, using the Windows key + E keyboard shortcut, or from the Start menu, click the File Explorer icon from the left rail.

  2. Browse to the folder with the files to rename.
  3. Click the View tab.
  4. Select the Details view.

    File Explorer details optionSource: Windows Central

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

    File Explorer rename optionSource: Windows Central

    Quick tip: You can also press the F2 button. Right-click the file and select the Rename option from the context menu. Or you can click the file once and slowly click the name again to trigger the rename action.

  8. Rename the file.
  9. Press the Tab key to jump and trigger the rename action for the next file down the list.
  10. Confirm the new file name.
  11. Press the Tab key again to jump and trigger the next rename.

    Quick tip: You can keep pressing the Tab key to skip the file and continue renaming other files.

  12. Continue repeating steps No. 9 and 10 to rename all the files.

Once you complete these steps, keep pressing the "Tab" key to continue renaming files.

Rename multiple files at once

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

  1. Open File Explorer.
  2. Browse to the folder with the files to change their names.
  3. Click the View tab.
  4. Select the Details view.

    File Explorer details optionSource: Windows Central

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

    File Explorer select all filesSource: Windows Central

    Quick tip: You can also use the Ctrl + A keyboard shortcut to select all files. You can press and hold the Ctrl key and then click each file to rename. Or you can 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 from the "Home" tab.
  8. Type the new file name and press Enter.

    File Explorer rename files in bulkSource: Windows Central

After you complete the steps, the selected files will be renamed using the same naming structure with a count number between parentheses to make each file name different. For instance, summer_trip_2021 (1).jpg and summer_trip_2021 (2).jpg.

If you made a mistake, you could use the Ctrl + Z keyboard shortcut to quickly undo the changes. Alternatively, you can click the menu button from the title bar and select the Undo button.

Previous 1 of 3
2 of 3

How to rename multiple files using PowerShell

Alternatively, you can also use PowerShell to rename one or multiple files. Although using this tool, there are many ways to manipulate files, the instruction in this guide are only meant to get started with the most common scenarios.

Rename single file

To rename only one file using PowerShell, use these steps:

  1. Open Start.
  2. Search for PowerShell and click the top result to open the app.
  3. Type the following command example to navigate to the folder with the files to rename and press Enter:

    cd PATH\TO\FOLDER

    In the command, replace PATH\TO\FOLDER with the actual path to the location.

    For example, this command navigates the "files" folder inside "Documents":

    cd Documents\files

    Powershell navigation folder locationSource: Windows Central

  4. (Optional) Type the following command to view a listing of the files in the location and press Enter:

    ls

  5. 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, make sure to specify the old and new file name and extension. The quotation marks are only required if the name includes spaces.

    For example, renames the file to "hiking_trip_2021_notes.txt":

    Rename-Item summer_trip_21_notes.txt hiking_trip_2021_notes.txt

    PowerShell rename one fileSource: Windows Central

  6. Repeat step No. 5 to continue renaming other the remaining files.

Once you complete the steps, the command will change the name of the file you specified.

Rename multiple files in bulk

To rename multiple files in bulk, when the name structure is not important, use these steps:

  1. Open Start.
  2. Search for PowerShell and click the top result to open the app.
  3. Type the following command example to navigate to the folder with the files to rename and press Enter:

    cd PATH\TO\FOLDER

    In the command, replace PATH\TO\FOLDER with the actual path to the location.

    For example, this command navigates the "files" folder inside "Documents":

    cd Documents\files

    Powershell navigation folder locationSource: Windows Central

  4. (Optional) Type the following command to view a listing of the files in the location and press Enter:

    ls

  5. Type the following command to rename multiple files in bulk and press Enter:

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

    In the command, replace "NEW-FILE-NAME" with the actual structure name you want to use.

    For example, this command renames images with a ".jpg" extension using the same ("beach-trip-2021-") naming structure and appends a different number at the end of the name:

    ls | %{Rename-Item $_ -NewName ("beach-trip-2021-{0}.jpg" -f $nr++)}

    PowerShell bulk rename multiple filesSource: Windows Central

After you complete these steps, all the files with the specified format will be renamed using the naming structure you specified.

Trim multiple file names

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

  1. Open Start.
  2. Search for PowerShell and click the top result to open the app.
  3. Type the following command example to navigate to the folder with the files to rename and press Enter:

    cd PATH\TO\FOLDER

    In the command, replace PATH\TO\FOLDER with the actual path to the location.

    For example, this command navigates the "files" folder inside "Documents":

    cd Documents\files

    Powershell navigation folder locationSource: Windows Central

  4. (Optional) Type the following command to view a listing of the files in the location and press Enter:

    ls

  5. Type the following command to rename files using shorter names and press Enter:

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

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

    For example, this command trims the name of your files by eight characters:

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

    PowerShell trim part of the file nameSource: Windows Central

Once you complete these steps, you will end up with shorter file names depending on the length you specified in the command.

Delete 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. Type the following command example to navigate to the folder with the files to rename and press Enter:

    cd PATH\TO\FOLDER

    In the command, replace PATH\TO\FOLDER with the actual path to the location.

    For example, this command navigates the "files" folder inside "Documents":

    cd Documents\files

    Powershell navigation folder locationSource: Windows Central

  4. (Optional) Type the following command to view a listing of the files in the location and press Enter:

    ls

  5. Type the following command to remove part of the file name and press Enter:

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

    In the command, replace "OLD-FILE-NAME-PART" with the actual part of the name you want to replace.

    For example, this command removes the word "trip" from the name of all files in the folder:

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

    PowerShell delete part of file nameSource: Windows Central

After you complete the steps, the command will remove the part of the file name you specified in the command.

Replace part of the name from multiple files

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

  1. Open Start.
  2. Search for PowerShell and click the top result to open the app.
  3. Type the following command example to navigate to the folder with the files to rename and press Enter:

    cd PATH\TO\FOLDER

    In the command, replace PATH\TO\FOLDER with the actual path to the location.

    For example, this command navigates the "files" folder inside "Documents":

    cd Documents\files

    Powershell navigation folder locationSource: Windows Central

  4. (Optional) Type the following command to view a listing of the files in the location and press Enter:

    ls

  5. Type the following command to replace part of file name and press Enter:

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

    In the command, replace "OLD-FILE-NAME-PART" and "NEW-FILE-NAME-PART" with the old and new part of the file name.

    For example, this command replaces the word "vacation_" for "hiking_trip_" on the file name:

    ls | Rename-Item -NewName {$_.name -replace "beach--","hiking_trip_"}

    PowerShell rename part of file nameSource: Windows Central

Once you complete these steps, the command will modify the file names with the replacement you specified in the command.

Remove spaces from multiple files

Spaces as part of the file name can sometimes cause problems, even more, when using a command console. If you have files that contain spaces in their names, you can use PowerShell to replace the character for a visual separator, such as a dash or underscore symbol.

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

  1. Open Start.
  2. Search for PowerShell and click the top result to open the app.
  3. Type the following command example to navigate to the folder with the files to rename and press Enter:

    cd PATH\TO\FOLDER

    In the command, replace PATH\TO\FOLDER with the actual path to the location.

    For example, this command navigates the "files" folder inside "Documents":

    cd Documents\files

    Powershell navigation folder locationSource: Windows Central

  4. (Optional) Type the following command to view a listing of the files in the location and press Enter:

    ls

  5. Type the following command to remove spaces from file name and press Enter:

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

    In the command, make sure to replace "SEPARATOR" with the symbol you want to use instead of a space.

    For example, this command replaces spaces with underscores in all the files:

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

    PowerShell remove file name remove spacesSource: Windows Central

After you complete the steps, the file names' spaces will be replaced with the separator you specified.

Change 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. Type the following command example to navigate to the folder with the files to rename and press Enter:

    cd PATH\TO\FOLDER

    In the command, replace PATH\TO\FOLDER with the actual path to the location.

    For example, this command navigates the "files" folder inside "Documents":

    cd Documents\files

    Powershell navigation folder locationSource: Windows Central

  4. (Optional) Type the following command to view a listing of the files in the location and press Enter:

    ls

  5. Type the following command to change the extension on files and press Enter:

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

    In the command, replace ".NEW-EXTENSION" with a new extension for the files.

    For example, this command changes any file extension to ".doc":

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

    PowerShell change file extensionSource: Windows Central

Once you complete the steps, PowerShell will change the extension to the one you specified.

Rename specific extension file names

The above instructions will rename every file within the folder location. However, if you want to change the name of a particular file format, such as documents, pictures, or videos, you can use the "-filter" option.

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

  1. Open Start.
  2. Search for PowerShell and click the top result to open the app.
  3. Type the following command example to navigate to the folder with the files to rename and press Enter:

    cd PATH\TO\FOLDER

    In the command, replace PATH\TO\FOLDER with the actual path to the location.

    For example, this command navigates the "files" folder inside "Documents":

    cd Documents\files

    Powershell navigation folder locationSource: Windows Central

  4. (Optional) Type the following command to view a listing of the files in the location and press Enter:

    ls

  5. Type the following command to rename files with a specific extension and press Enter:

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

    In the command, replace "NEW-FILE-NAME" and "EXTENSION" with the parameter you want to use.

    For example, this command renames only files that include the ".jpg" extension:

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

    PowerShell only rename specific extension filesSource: Windows Central

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

2 of 3
3 of 3 Next

How to rename multiple files using Command Prompt

On Windows 10, Command Prompt also offers multiple ways to change the name of one or multiple files in bulk.

Rename single file

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

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

    cd c:\PATH\TO\FILES

    For instance, this example opens the "files" folder inside "Documents":

    cd %USERPROFILE%\Documents\files

    Command Prompt navigate folder locationSource: Windows Central

  4. Type the following command to view a listing of the files in the location and press Enter:

    dir

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

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

    In the command, replace "OLD-FILENAME.EXTENSION" and "NEW-FILENAME.EXTENSION" with the old and new file name you want. The quotation marks are only required if the name includes spaces.

    For instance, this commands renames the file to "summer_trip_21_notes.txt":

    ren summer_trip_21_notes.txt summer_vacation_21_notes.txt

    Command Prompt rename single fileSource: Windows Central

  6. Repeat step No. 5 to change the name of the remaining files

Once you complete these steps, Command Prompt will rename the file with the new name you specified.

Rename 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. Type the following command example to navigate to the folder with the files to rename and press Enter:

    cd c:\PATH\TO\FILES

    For instance, this example opens the "files" folder inside "Documents":

    cd %USERPROFILE%\Documents\files

  4. (Optional) Type the following command to view a listing of the files in the location and press Enter:

    dir

  5. Type the following command to rename the files in bulk and press Enter:

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

    In the command, replace "FILE-EXTENSION" with the extension of the files you want to update and "FILE-NAME" with part of the name you want to add to all the files. The asterisk * is a wildcard that tells the ren command to rename everything with a specific extension. The question mark ? is also a wildcard, but it represents a character of the original name you want to keep as part of the new name.

    For instance, this command 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 ???-hikingTrip.*

    Command Prompt rename multiple filesSource: Windows Central

    Quick tip: When renaming files, the ren command sees a period (.) as the end of the filename. This means that if you have files with one or more periods as part of the name, the command may produce unexpected results.

After you complete the steps, the files will be renamed using the settings you specified.

Trim multiple file names

To make 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. Type the following command example to navigate to the folder with the files to rename and press Enter:

    cd c:\PATH\TO\FILES

    This example opens the "files" folder inside "Documents":

    cd %USERPROFILE%\Documents\files

    Command Prompt navigate folder locationSource: Windows Central

  4. (Optional) Type the following command to view a listing of the files in the location and press Enter:

    dir

  5. Type the following command to make file names shorter and press Enter:

    ren *.* ?????.*

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

    For instance, this command trims the file names longer than five characters:

    ren *.* ?????.*

    Command Prompt trim multiple files Source: Windows Central

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

Once you complete these steps, you will end up with shorter file names depending on the question marks (?) you specified in the command.

Modify multiple file names

To rename part of the 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. Type the following command example to navigate to the folder with the files to rename and press Enter:

    cd c:\PATH\TO\FILES

    This example opens the "files" folder inside "Documents":

    cd %USERPROFILE%\Documents\files

    Command Prompt navigate folder locationSource: Windows Central

  4. (Optional) Type the following command to view a listing of the files in the location and press Enter:

    dir

  5. Type the following command to rename the part of the file name and press Enter:

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

    In the command, replace "OLD-FILE-NAME-PART" and "NEW-FILENAME-PART" with the old and new parts of the filename. The asterisk * is a wildcard that will match the rest of the filename and file extension to append the new part of the name.

    For instance, this command renames files that start with "summer_trip_21" to "vacation_2021":

    ren summer_trip_21*.* vacation_2021*.*

    Modify multiple filenames commandSource: Windows Central

After you complete the steps, the files with similar names will be modified with the new name structure you specified in the command.

Change file extension

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

  1. Open Start.
  2. Search for Command Prompt and click the top result to open the app.
  3. Type the following command example to navigate to the folder with the files you want to rename and press Enter:

    cd c:\PATH\TO\FILES

    This example opens the "files" folder inside "Documents":

    cd %USERPROFILE%\Documents\files

    Command Prompt navigate folder locationSource: Windows Central

  4. (Optional) Type the following command to view a listing of the files in the location and press Enter:

    dir

  5. Type the following command to change the file extension and press Enter:

    ren *.OLD-EXTENSION *.NEW-EXTENSION

    In the command, change "OLD-EXTENSION" and "NEW-EXTENSION" with the old and new file extension.

    For instance, this command changes the extension from ".txt" to ".doc" compatible with Microsoft Word for the files in the location:

    ren *.txt *.doc

    This example without wildcards (*) changes the only extension of a single file from ".txt" to ".doc":

    ren vacation_2021_notes.txt vacation_2021_notes.doc

    Change file extension commandSource: Windows Central

Once you complete the steps, the file extension will be replaced with the new extension specified in the command.

Rename files with specific extension

The previous steps rename every file within the location. However, if you want to rename only a group of files with a specific format, you need to omit the asterisk * and specify the command's target extension.

To rename files with a specific file extension on Windows 10 with Command Prompt, use these steps:

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

    cd c:\PATH\TO\FILES

    This example opens the "files" folder inside "Documents":

    cd %USERPROFILE%\Documents\files

    Command Prompt navigate folder locationSource: Windows Central

  4. (Optional) Type the following command to view a listing of the files in the location and press Enter:

    dir

  5. Type the following command to change the file extension in the location and press Enter:

    ren OLD-FILE-NAME*.EXTENSION NEW-FILE-NAME*.EXTENSION

    In the command, change "OLD-FILE-NAME," "NEW-FILE-NAME," and "EXTENSION" with the old and new file name and extension you want to target.

    For instance, this command only renames images with a ".jpg" extension:

    ren picture-*.jpg vacation*.jpg

    Change group of file format nameSource: Windows Central

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

While these commands have been tested to work as expected, it is always recommended that you perform a test run before trying to rename the original files on your computer.

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