How do You Rename Many File Extensions at Once in Windows 10 and 11?

Need to rename a folder of files? Learn two Windows ways and what a rename does not do.

Fact-checked Reviewed by Aswin Vijayan Updated November 3, 2026 Based on 3 sources
Summary

Windows renames many file extensions at once with the ren command or the PowerShell Rename-Item cmdlet. Show file name extensions in File Explorer first so you see what you rename. Renaming an extension does not convert the file to another format. Test the command on a copy of the folder before you rename real files.

You have a folder of files with the wrong ending and renaming them one by one takes too long. Windows renames every file in the set with one command.

This guide shows two methods that follow Microsoft documentation and one warning about what a rename does not do.

How do You Show File Extensions in Windows?

Microsoft explains that a Windows file name has a name and a short extension that identifies the file type. In expenses.xlsx the extension is xlsx. See common file name extensions in Windows.

  1. Open File Explorer from the taskbar search box.
  2. Open the View menu and go to Show.
  3. Turn on File name extensions.

Does Renaming an Extension Convert the File?

No. Microsoft states that changing an extension only renames the file and does not convert it to another format. Renaming a PNG file to JPG leaves PNG data inside and some apps will fail to open it.

Use a rename only when the file already has the format of the new extension. Otherwise save the file again in the format you need.

How do You Rename Extensions With the ren Command?

Microsoft documents ren with wildcards. Both names accept the asterisk and question mark. Reusing an existing name makes the command fail with the message Duplicate file name or file not found. See the ren command.

  1. Open the folder in File Explorer.
  2. Type cmd in the address bar and press Enter.
  3. Enter the command below.
Command Prompt
:: Rename every .txt file in the current folder to .doc
ren *.txt *.doc

Microsoft states that you cannot use ren to move files to another folder or drive.

How do You Rename Extensions With PowerShell?

Microsoft documents the Rename-Item cmdlet as a way to rename an item without touching its content. Rename-Item cannot replace an existing item. This example follows the Microsoft pattern and anchors the match to the end of the name. See Rename-Item.

PowerShell
# Rename every .txt file in the current folder to .log
Get-ChildItem *.txt | Rename-Item -NewName { $_.Name -replace '\.txt$','.log' }

Add the -WhatIf parameter to Rename-Item first. PowerShell then lists the planned renames and does not apply them.

How do You Avoid Mistakes in a Bulk Rename?

  • Work on a copy. Copy the folder and test the command there.
  • Use unique names. Rename fails when the new name exists.
  • Check the result. Open two or three files to confirm they work.

If a rename damages files see how to recover deleted data from a desktop computer. Free space matters for large folders, so see free disk cleanup tools for Windows.

Frequently Asked Questions

How do I Rename Many File Extensions at Once in Windows?

Use the ren command with wildcards in Command Prompt or the Rename-Item cmdlet in PowerShell. Both rename every matching file in the folder.

Does Renaming a File Extension Convert It?

No. Microsoft states that changing an extension only renames the file and does not convert it.

How do I See File Extensions in Windows 11?

Open File Explorer, select View, go to Show and turn on File name extensions.

Why does the ren Command Fail?

Reusing an existing name makes it fail. Microsoft documents the message Duplicate file name or file not found for that case.

Can Rename-Item Move Files?

No. Microsoft states that Rename-Item cannot move an item. Use Move-Item for that task.

Key Takeaways

  • Show file name extensions before you rename anything.
  • Renaming an extension does not convert the file.
  • Command Prompt renames many files with ren and wildcards.
  • Rename-Item does the same job in PowerShell with a preview through WhatIf.
  • Test on a copy because a failed rename can disrupt your folder.

Sources and References

This guide follows Microsoft documentation.

  1. Common File Name Extensions in Windows (Microsoft Support) support.microsoft.com
  2. ren (Microsoft Learn) learn.microsoft.com
  3. Rename-Item (Microsoft Learn) learn.microsoft.com