How to Batch Rename Files in Windows 10

Do it in File Explorer or use Windows PowerShell

Renaming a file on Windows 10 is simple. You just right-click and select Rename. But doing this for a few dozen or a few hundred files gets tedious. Thankfully, it's easy to batch rename files in Windows 10 using File Explorer, PowerShell, or the Command Prompt.

Batch Rename Files in Windows 10 Using File Explorer

If you have a batch of pictures or other files that share something in common, you can rename all the files to use the same basic file structure.

For example, you can rename all your Disney World vacation photos from 2019 to 'Disneyworld Vacation Photos 2019.' When you batch rename files in Windows 10 using File Explorer (also known as File Manager), each file receives the new name with a number at the end, such as (1), (2), and so on.

  1. Open File Explorer and navigate to the folder that contains all the files you want to rename.

    Screenshot of original files in File Explorer
  2. Select View > Details in the Layout group in the ribbon. This lets you view the entire file name for each file in the folder.

    Screenshot of Details in File Explorer
  3. Select all files in the folder by selecting the first file, holding the Shift key, and then selecting the last file. Or you can select Ctrl+A to select all files as well.

    Screenshot of selecting all files in File Explorer
  4. Select Home > Rename from the Organize group in the ribbon. This will change the first file to a field so you can type the new file name. Type the file name you'd like to use to rename all the files.

    Screenshot of renaming the first file when renaming multiple files
  5. When you press Enter, you'll notice all the other selected files received the same name with a number at the end to differentiate each file.

    Screenshot of renamed files in File Explorer

Using File Explorer to batch rename files in Windows 10 is just as fast as renaming a single file, with just a few extra clicks.

If you mistyped the name or changed your mind about renaming all the files, you can press Ctrl+Z to undo your last rename operation.

Batch Rename Multiple Files With PowerShell

If you prefer using a command line tool to rename all your files, PowerShell is an excellent tool.

Using the last example, you can use PowerShell to rename all the files so that the first word of the file name is "Our" instead of "My".

  1. Select the Start menu, type Powershell, and select Windows PowerShell to open the app.

    Screenshot of opening PowerShell on Windows 10
  2. Navigate to the directory where your files are stored by using the cd command to navigate folders.

    Screenshot of navigating directories with PowerShell
  3. Once you're in the correct directory, type the command:

     dir | rename-item -NewName {$_.name -replace "My","Our"} 

    Then press Enter.

    Screenshot of using PowerShell to rename multiple files
  4. How the parameters for this function work:

    • Dir: Sends all files in the folder to the rename-item command
    • rename-item: A PowerShell command to rename files
    • $_.name: Symbolizes each of the file being replaced
    • -replace: Tells PowerShell that the action to take on each file is to replace the name
    • "My","Our": The first word in quotes is the word in each title to replace, and the second word is what you want to replace it with

    The Dir command in PowerShell has a lot of functionality.

    The rename-item command in PowerShell has other syntax you can use. For example following rename-item with "$_ "Preface - $_" will add "Preface - " to the front of every filename.

  5. When the command finishes, you'll notice all your files have been renamed in the manner you specified.

    Screenshot of files renamed with PowerShell

Batch Rename Multiple Files With Command Prompt

You can also rename multiple files using the command prompt and the ? (question mark) wildcard.

  1. Launch the command prompt and navigate to the folder where your files are stored.

    Screenshot of navigating to folder in command prompt
  2. Type the command

    ren *.* ????????????-Vacation.jpg 

    Then press Enter.

    Using ren command in command prompt
  3. Now you'll see all the files have been renamed, keeping the first 12 original characters of the file name and adding "-Vacation" at the end.

    Renaming files using command prompt
  4. Using the command prompt is an easy way to rename files quickly, keeping a unique portion of the file name while adding something descriptive at the end.

Whether you choose to batch rename files in Windows 10 using File Explorer, PowerShell, or Command Prompt really depends on the original file names and how you want to rename them.