How to Batch Rename Multiple Files at Once in Windows

Renaming dozens or hundreds of files one by one is tedious and time-consuming. Windows offers several built-in methods and third-party tools to rename multiple files simultaneously. This guide shows you exactly how to batch rename files quickly and efficiently.

What Is Batch Renaming?

Batch renaming means changing the names of multiple files at the same time using a pattern or rule. Instead of renaming each file individually, you apply one action to all selected files. This saves hours when organizing photos, documents, or any file collection.

You can add numbers, replace text, change extensions, or apply custom naming patterns to hundreds of files in seconds.

Table of Contents

Quick Answer: The Fastest Way to Batch Rename Files

The quickest method uses Windows File Explorer:

  1. Select all files you want to rename
  2. Press F2 on your keyboard
  3. Type the new name
  4. Press Enter

Windows automatically adds numbers in parentheses to each file: filename(1), filename(2), filename(3), and so on.

Now let’s explore all the methods in detail so you can choose the best approach for your needs.

Batch Rename Multiple Files at Once in Windows

Method 1: Using File Explorer (Built-in Windows Method)

This method works on Windows 10, Windows 11, and older versions. No additional software required.

Step-by-Step Instructions

Select Your Files

Open File Explorer and navigate to the folder containing your files. Select the files you want to rename:

  • Click the first file
  • Hold Ctrl and click individual files for specific selection
  • Hold Shift and click the last file to select a range
  • Press Ctrl+A to select all files in the folder

Start the Rename Process

With files selected, do one of these:

  • Press F2 on your keyboard
  • Right-click any selected file and choose “Rename”
  • Click once on any selected filename

Enter the New Name

Type your desired filename. Don’t worry about the numbering system yet. Just type the base name you want.

Apply the Changes

Press Enter. Windows automatically renames all selected files using your base name plus sequential numbers in parentheses.

Example Output

If you rename files to “Vacation Photo” you’ll get:

  • Vacation Photo.jpg
  • Vacation Photo (1).jpg
  • Vacation Photo (2).jpg
  • Vacation Photo (3).jpg
See also  How to Upgrade MetaMask for Cross-Chain Use in 2026

The first file gets the exact name you typed. Subsequent files get numbers added.

Limitations of This Method

This basic method has restrictions:

  • Limited control over numbering format
  • Cannot add prefixes or suffixes selectively
  • Cannot replace specific text in filenames
  • Numbers appear in parentheses only
  • Cannot change file extensions in batch

For more control, use the methods below.

Method 2: Using Command Prompt for Advanced Batch Renaming

Command Prompt gives you more flexibility with filename patterns. This method requires typing commands but offers powerful options.

Basic Command Structure

The rename command (ren) follows this pattern:

ren "old_filename_pattern" "new_filename_pattern"

How to Access Command Prompt

  1. Open File Explorer to your target folder
  2. Click the address bar at the top
  3. Type “cmd” and press Enter
  4. Command Prompt opens directly in that folder

Common Batch Rename Commands

Replace Text in All Filenames

To replace “draft” with “final” in all text files:

ren *.txt *.txt

Wait, that’s not right. Use this instead:

for %f in (*.txt) do ren "%f" "%f:draft=final%"

Add Prefix to All Files

To add “2024_” before all JPG files:

ren *.jpg 2024_*.jpg

Change File Extensions

To change all .jpeg files to .jpg:

ren *.jpeg *.jpg

Remove Spaces from Filenames

Spaces cause problems in some systems. Remove them:

for %f in (*) do ren "%f" "%f: =_%"

This replaces all spaces with underscores.

Using PowerShell for Complex Renaming

PowerShell offers even more control than Command Prompt. Access it the same way (type “powershell” in the folder address bar).

Rename with Sequential Numbers

Get-ChildItem | ForEach-Object -Begin { $count=1 } -Process { Rename-Item $_ -NewName "Photo_$count.jpg"; $count++ }

This creates Photo_1.jpg, Photo_2.jpg, etc.

Remove Characters from Beginning

To remove the first 5 characters from all filenames:

Get-ChildItem | Rename-Item -NewName {$_.Name.Substring(5)}

Add Date to Filenames

Get-ChildItem | Rename-Item -NewName {$_.BaseName + "_" + (Get-Date -Format "yyyy-MM-dd") + $_.Extension}

This adds the current date to each filename.

For more PowerShell scripting techniques, Microsoft’s official PowerShell documentation provides comprehensive guidance.

Method 3: Using Third-Party Batch Rename Tools

Free software tools offer user-friendly interfaces for complex renaming tasks. These tools provide preview features so you can see changes before applying them.

Bulk Rename Utility (Free)

Bulk Rename Utility is powerful and completely free.

Features:

  • Preview changes before applying
  • Regular expression support
  • Date and timestamp modification
  • Case conversion
  • Add, remove, or replace text
  • Numbering with custom formats
  • Filter files by attributes

How to Use:

  1. Download from bulkrenameutility.co.uk
  2. Install and open the program
  3. Navigate to your target folder in the upper panel
  4. Select files in the lower panel
  5. Choose renaming options from the middle panels
  6. Check the preview in the “New Name” column
  7. Click “Rename” when satisfied

Common Use Cases:

To add sequential numbers with leading zeros:

  • Go to “Numbering (12)” section
  • Set Mode to “Suffix”
  • Set Start at “1”
  • Set Pad digits to “3” for 001, 002, 003 format

To change text case:

  • Use “Case (4)” section
  • Select “Upper” for UPPERCASE or “Lower” for lowercase

Advanced Renamer (Free)

Another excellent free option with a clean interface.

Features:

  • Multiple rename methods in one batch
  • Tag support for media files
  • GPS data for photos
  • Batch mode for different folders
  • Scripting support

Basic Usage:

  1. Add files by dragging them into the window
  2. Add rename methods from the left panel
  3. See preview in the main window
  4. Click “Start Batch” to execute

File Renamer Basic (Free/Paid)

Available in Microsoft Store with a simple interface.

Advantages:

  • Easy drag-and-drop interface
  • No installation required
  • Instant preview
  • Undo feature
See also  Top 7 Dall-E 3 Free Alternatives in 2024

Best For:

  • Quick one-time renaming tasks
  • Users who prefer modern UWP apps
  • Simple renaming without complex rules

Method 4: Batch Rename Files Using Excel or Notepad

This creative method works well when you need unique names for each file without a pattern.

The Excel Method

Step 1: Generate the Command List

  1. Open File Explorer in your target folder
  2. Hold Shift and right-click in empty space
  3. Select “Open PowerShell window here”
  4. Type: Get-ChildItem | Select-Object Name | Export-Csv filelist.csv
  5. Open filelist.csv in Excel

Step 2: Create New Names

  1. The first column shows current filenames
  2. Create a second column with your desired new names
  3. Create a third column with the formula: ="ren """&A2&""" """&B2&"""
  4. Copy this formula down for all files

Step 3: Execute the Batch File

  1. Copy all cells from the third column
  2. Open Notepad
  3. Paste the commands
  4. Save as “rename.bat” (not .txt)
  5. Place the batch file in the same folder as your files
  6. Double-click to execute

This method gives you complete control over each filename while still being faster than manual renaming.

The Notepad Method

For simpler tasks without Excel:

  1. In File Explorer, select all files
  2. Right-click and choose “Copy”
  3. Open Notepad
  4. Paste (you’ll see all filenames)
  5. Use Find and Replace (Ctrl+H) to modify names
  6. Add “ren ” before each line
  7. Save as .bat file and run

Practical Examples for Common Scenarios

Organizing Photos by Date

Scenario: You have 200 vacation photos with camera-generated names like DSC_0001.jpg.

Solution Using Bulk Rename Utility:

  1. Select all photos
  2. In “Name (2)” section, select “Remove”
  3. In “Add (7)” section, add prefix “Hawaii_Vacation_”
  4. In “Numbering (12)” add suffix numbering starting at 1
  5. Result: Hawaii_Vacation_001.jpg, Hawaii_Vacation_002.jpg, etc.

Cleaning Up Downloaded Files

Scenario: Downloaded files have messy names with special characters and extra text.

Solution Using Command Prompt:

for %f in (*) do ren "%f" "%f: =_%"
for %f in (*) do ren "%f" "%f:[=(%"
for %f in (*) do ren "%f" "%f:]=)%"

This replaces spaces and brackets with cleaner characters.

Organizing Work Documents

Scenario: You need to add project codes to all documents in a folder.

Solution Using File Explorer:

  1. Select all files
  2. Press F2
  3. Type “ProjectX_2024_”
  4. Press Enter
  5. All files now start with ProjectX_2024_

Preparing Files for Web Upload

Scenario: Web servers prefer lowercase filenames without spaces.

Solution Using PowerShell:

Get-ChildItem | Rename-Item -NewName { $_.Name.ToLower().Replace(" ", "-") }

This converts everything to lowercase and replaces spaces with hyphens.

Important Tips and Best Practices

Always Create Backups First

Before batch renaming hundreds of files:

  • Copy the entire folder to another location
  • Test your rename operation on a few files first
  • Some renaming operations cannot be undone easily

Use Preview Features

Modern rename tools show previews. Always check:

  • File extensions remain correct
  • No duplicate names are created
  • Special characters are handled properly
  • Numbering sequence looks right

Understanding File Name Restrictions

Windows file names cannot contain these characters:

  • < > : " / \ | ? *

If your rename operation includes these, Windows will show an error or replace them automatically.

Maximum Path Length

Windows has a 260-character limit for full file paths. If your renamed files create paths longer than this, you’ll encounter errors.

Use shorter base names or move files to folders with shorter paths.

File Extensions Matter

Never accidentally change file extensions unless intentional. A .jpg renamed to .txt won’t open properly.

Most rename tools preserve extensions automatically, but always verify.

Batch Rename Methods

MethodEase of UseFlexibilityPreviewBest For
File ExplorerVery EasyLowNoQuick simple renames
Command PromptModerateHighNoText pattern replacements
PowerShellDifficultVery HighNoComplex scripting needs
Bulk Rename UtilityEasyVery HighYesMost renaming tasks
Advanced RenamerEasyHighYesMedia file organization
Excel MethodModerateHighYesUnique custom names

Troubleshooting Common Problems

“File in Use” Errors

If renaming fails because files are open:

  • Close all programs that might be using the files
  • Close preview panes in File Explorer
  • Restart File Explorer (Ctrl+Shift+Esc, restart Windows Explorer)
  • Restart your computer if necessary
See also  Wget.exe for Windows: Quick Guide to Download Files from Command Line

Files Disappear After Renaming

Files aren’t actually gone. They likely:

  • Were renamed with leading spaces (invisible)
  • Changed sort order in the folder
  • Got moved by accident in the rename process

Press F5 to refresh the folder view. Change sorting to “Date Modified” to find recently changed files.

Duplicate Name Errors

Windows won’t create two files with identical names in the same folder. If your rename creates duplicates:

  • Add numbering sequences
  • Include original filename portions
  • Add timestamps or dates to ensure uniqueness

Special Characters Problems

If special characters cause issues:

  • Stick to letters, numbers, hyphens, and underscores
  • Avoid symbols that have special meanings in Windows
  • Replace problematic characters before batch renaming

Undo Batch Rename Mistakes

File Explorer’s basic rename cannot be undone with Ctrl+Z after closing the folder.

Prevention strategies:

  • Use tools with built-in undo features
  • Keep the Excel/Notepad file with original names
  • Work on copied files first
  • Take screenshots of the original file list

Some third-party tools like Advanced Renamer have undo features that save you from mistakes.

Advanced Techniques for Power Users

Using Regular Expressions

Regular expressions (regex) provide powerful pattern matching for complex renaming.

In Bulk Rename Utility, enable regex mode to:

Remove all numbers from filenames:

Pattern: \d+
Replace with: (empty)

Extract and rearrange date patterns:

Pattern: (\d{4})-(\d{2})-(\d{2})
Replace with: $3.$2.$1

Creating Reusable Rename Scripts

Save frequently used PowerShell scripts as .ps1 files:

# Save as AddDatePrefix.ps1
$date = Get-Date -Format "yyyy-MM-dd"
Get-ChildItem -Filter *.* | Rename-Item -NewName {$date + "_" + $_.Name}

Run by right-clicking and selecting “Run with PowerShell.”

Batch Renaming Across Multiple Folders

To rename files in all subfolders using PowerShell:

Get-ChildItem -Recurse -Filter *.txt | Rename-Item -NewName {$_.Name.Replace("old", "new")}

The -Recurse parameter processes all subdirectories.

Renaming Based on File Properties

PowerShell can rename files based on metadata:

Get-ChildItem *.jpg | ForEach-Object {
    $date = $_.CreationTime.ToString("yyyy-MM-dd")
    Rename-Item $_ -NewName ($date + "_" + $_.Name)
}

This adds creation date to each photo’s filename.

Choosing the Right Method for Your Needs

For Beginners

Start with File Explorer’s built-in method. It handles 90% of basic renaming needs without learning curves.

For Regular Users

Download Bulk Rename Utility or Advanced Renamer. The graphical interface with preview makes complex tasks simple.

For IT Professionals

Master PowerShell scripting for automation and integration with other administrative tasks.

For One-Time Complex Tasks

The Excel method provides maximum control when you need unique names without patterns.

Conclusion

Batch renaming files in Windows doesn’t have to be complicated. The built-in File Explorer method works perfectly for simple tasks, while Command Prompt and PowerShell handle advanced needs. For the best balance of power and usability, free tools like Bulk Rename Utility offer preview features and intuitive interfaces.

Start with simple methods and gradually explore more advanced techniques as your needs grow. Always test on copies first, and use preview features when available. With these tools and techniques, you can organize thousands of files in minutes instead of hours.

Frequently Asked Questions

Can I undo a batch rename operation in Windows?

Windows File Explorer’s basic rename cannot be undone after you close the folder or perform other actions. Third-party tools like Advanced Renamer and Bulk Rename Utility include undo features. Always work on copied files first for important data, or keep a text file listing original filenames for reference.

How do I batch rename files without changing the file extension?

Most methods preserve extensions automatically. In File Explorer, when you rename to “NewName” it keeps the existing extension. In Command Prompt, use patterns like *.jpg which maintains the extension. Third-party tools have separate fields for name and extension, preventing accidental changes.

What’s the maximum number of files I can rename at once in Windows?

There’s no hard limit on the number of files you can batch rename. File Explorer and third-party tools can handle thousands of files simultaneously. The practical limit depends on your computer’s memory and processing power. For extremely large batches (10,000+ files), PowerShell scripts or specialized tools perform better than graphical interfaces.

Can I batch rename files on external drives or network locations?

Yes, all methods work on external drives, USB sticks, and network locations as long as you have write permissions. The process is identical to renaming local files. Network drives may be slower due to transfer speeds. Ensure stable connections when renaming many files over networks to avoid interruptions.

MK Usmaan