How to Rename Multiple Files at Once in Windows 11 and 10

Aseem Kishore
ยท
3 min read

Help Desk Geek is reader-supported. We may earn a commission when you buy through links on our site. Learn more.

Every file in your Windows 11 or Windows 10 folder starts with โ€œCopy of โ€œ, and removing it by hand gets old fast. PowerShell can preview the new names before changing anything.

Fix #1: Remove matching text with PowerShell

This method keeps the rest of each filename, including its extension. Copy the folder to an external backup drive first if you canโ€™t afford to lose the original names.

  1. Open the folder containing the files in File Explorer.
  2. Click the address bar, type powershell, and press Enter. A PowerShell window should open in that folder.
Windows 11 File Explorer address bar containing powershell above a folder of files named Copy of Black Tea.jpg and Copy of Green Tea.png
  1. Run this command to preview the changes:
   Get-ChildItem -File -Filter "Copy of *" |
       Rename-Item -NewName { $_.Name -replace '^Copy of ', '' } -WhatIf

PowerShell should show proposed changes such as Copy of Black Tea.jpg becoming Black Tea.jpg. The -WhatIf option leaves the files untouched.

PowerShell WhatIf output previewing the removal of Copy of from filenames
  1. Check that every proposed name is correct and that none already exists in the folder.
  2. Run the same command without -WhatIf to rename the files:
   Get-ChildItem -File -Filter "Copy of *" |
       Rename-Item -NewName { $_.Name -replace '^Copy of ', '' }

The files should now appear without the prefix. The ^ limits the replacement to the start of each name. Microsoftโ€™s Rename-Item documentation confirms that the command changes names without changing file contents.

Need to replace a word anywhere in a filename instead? Preview that rule with:

Get-ChildItem -File -Filter "*house*" |
    Rename-Item -NewName { $_.Name -replace 'house', 'home' } -WhatIf

For example, blue-house.jpg would become blue-home.jpg. Remove -WhatIf only after checking the preview. PowerShell treats the search text in -replace as a regular expression, so metacharacters such as a period, brackets, parentheses, a plus sign, or a question mark need escaping (with a backslash) when you mean them literally.

Fix #2: Give selected files one base name in File Explorer

Use this when you want numbered names, such as Tea (1).jpg and Tea (2).jpg, rather than keeping parts of the original names.

  1. Open the folder in File Explorer.
  2. Sort the files in the order you want them numbered.
  3. Select the files you want to rename.
  4. Press F2, type a base name such as Tea, and press Enter.
Windows 11 File Explorer showing selected image files renamed with the shared base name Tea and numbered suffixes

Each selected file keeps its own extension, so you can select files with different extensions together; every file gets the shared base name with a number in parentheses appended. Check the results before moving or sharing them.

Fix #3: Preview a visual replacement with PowerRename

If you have Microsoft PowerToys PowerRename installed, its preview is a good option when you donโ€™t want to write a command.

  1. Select the files in File Explorer.
  2. Open the selectionโ€™s context menu and choose the PowerRename command. Its placement can vary by Windows version.
  3. Enter Copy of as the text to find, leaving the replacement field empty.
  4. Check the proposed names in the preview.
  5. Apply the rename when the preview shows only the files you intended to change.
Microsoft PowerToys PowerRename preview showing Copy of Black Tea.jpg changing to Black Tea.jpg

When names donโ€™t change

In Windows Terminal or PowerShell, run Get-Location to check the current folder. Then run Get-ChildItem -File -Filter "Copy of *" to see which files match. If the preview is correct but the rename reports a conflict, check whether a destination filename already exists.

Conclusion

Fix #1 is my pick for removing an exact prefix: its preview makes a large rename easier to check. If unwanted text keeps appearing in new files, check the settings in the app exporting them.