Rename Files in Bulk on Windows and Mac: Fast, Safe Patterns (Numbers, Dates, Find/Replace)

By Abdulbatin Anaza • Last updated: May 2026 • Estimated reading time: 16–22 minutes

Renaming dozens (or thousands) of files by hand is a time sink—and a recipe for messy names. With the right tools and patterns, you can rename files in bulk safely in minutes: add prefixes/suffixes, replace text, insert dates, fix extensions, and auto‑number in order. This guide shows how to rename files in bulk on Windows (File Explorer, PowerToys PowerRename, PowerShell) and macOS (Finder’s Rename, Automator/Shortcuts, Terminal), plus best‑practice naming conventions so your folders stay clean.

New to organizing? Pair this with: Simple Google Drive Folder Structure.

Before You Start: Safety and Setup

  • Make a small test set first. Copy 5–10 files and practice your pattern. When it looks right, run it on the full set—especially before you rename files in bulk.
  • Decide the sort order. If you’re numbering files, decide whether to sort by Name, Date Created, or Date Modified before you rename, so numbers match the intended order.
  • Use zero‑padded numbers. Prefer 01, 02, … 10, 11 so names sort correctly.
  • Keep extensions intact. Don’t rename the dot and extension by accident (e.g., .jpg, .pdf). Most tools protect extensions or have a setting for it.
  • Backups matter for huge jobs. If renaming thousands of critical files, back up or snapshot the folder first.

Windows: Quick Rename in File Explorer (Built‑in)

Good for fast, simple numbering when you need to rename files in bulk quickly.

  1. Select the files in the order you want. Tip: Sort by the right column, or manually Ctrl+click to choose order.
  2. Press F2 (or right‑click → Rename) and type a base name, e.g., Trip-Photo.
  3. Press Enter. Windows renames them as Trip-Photo (1), Trip-Photo (2), etc.

Pros: instant, no installs. Cons: limited formatting and find/replace.

Windows: PowerToys PowerRename (Best GUI for Patterns)

Microsoft PowerToys → PowerRename adds a capable bulk‑rename window to the right‑click menu—perfect when you want to rename files in bulk with search/replace and numbering.

Install PowerToys

  • Download/install: Microsoft PowerToys (Store or GitHub).
  • Open PowerToys → enable PowerRename.

Use PowerRename

  1. Select files in File Explorer → right‑click → PowerRename.
  2. In the window, set:
    • Search for: text or regex to find (e.g., IMG_)
    • Replace with: new text (e.g., Hiking_)
    • Options: Use Regular Expressions, Match All Occurrences, Exclude file extensions, Enumerate items (auto‑number)
  3. Preview updates live. If it looks right, click Rename.

PowerRename recipes (copy/paste)

  • Add a prefix to all names
    Search: ^ | Replace: ClientA_ | Options: Use Regular Expressions, Exclude file extensions
  • Add a suffix before the extension
    Search: (?=\.([^\.]+)$) | Replace: _v01 | Options: Use Regular Expressions
  • Replace spaces with dashes
    Search: \s+ | Replace: - | Options: Use Regular Expressions
  • Number files in current order (01, 02…)
    Check Enumerate items. Use {num:00} in Replace (e.g., Report_{num:00}).
  • Normalize case (lowercase names)
    Toggle Make Lowercase (if available), or use a PowerShell method below.

Docs: PowerRename guide

Windows: PowerShell (Precise and Scriptable)

For pro‑level control and giant batches, PowerShell lets you rename files in bulk reproducibly. Open PowerShell in the folder (Shift+right‑click → Open PowerShell window here).

Examples

Add a prefix

Get-ChildItem -File | ForEach-Object {
  $new = "ClientA_" + $_.Name
  Rename-Item $_.FullName -NewName $new
}

Replace text (spaces → dashes)

Get-ChildItem -File | ForEach-Object {
  $new = $_.Name -replace ' ', '-'
  Rename-Item $_.FullName -NewName $new
}

Add sequential numbers (01, 02…)

$i = 1
Get-ChildItem -File | Sort-Object Name | ForEach-Object {
  $base = [System.IO.Path]::GetFileNameWithoutExtension($_.Name)
  $ext  = $_.Extension
  $new  = "{0}_{1:00}{2}" -f $base, $i, $ext
  Rename-Item $_.FullName -NewName $new
  $i++
}

Insert last‑modified date (YYYY‑MM‑DD)

Get-ChildItem -File | ForEach-Object {
  $d    = $_.LastWriteTime.ToString('yyyy-MM-dd')
  $base = [IO.Path]::GetFileNameWithoutExtension($_.Name)
  $ext  = $_.Extension
  $new  = "{0}_{1}{2}" -f $base, $d, $ext
  Rename-Item $_.FullName -NewName $new
}

Change extension (e.g., .jpeg → .jpg)

Get-ChildItem -File -Filter *.jpeg | ForEach-Object {
  $new = [IO.Path]::ChangeExtension($_.FullName, ".jpg")
  Rename-Item $_.FullName -NewName $new
}

Lowercase all names

Get-ChildItem -File | ForEach-Object {
  $new = $_.Name.ToLower()
  Rename-Item $_.FullName -NewName $new
}

PowerShell safety tips: Test first: add -WhatIf to Rename-Item to preview. Target types: add -File or -Directory to avoid renaming folders by mistake. Scope: add -Recurse to include subfolders (careful!). Refs: Rename-Item

macOS: Finder’s Built‑in “Rename” (Excellent for Everyday Jobs)

Finder can rename files in bulk with Replace Text, Add Text, and Format (index/counter/date).

  1. Select files in the intended order (sort first if numbering).
  2. Right‑click → Rename X Items… (or File menu → Rename).
  3. Pick an action:
    • Replace Text: Find: IMG_ → Replace with: Hiking_
    • Add Text: Add: _v01 → Before name or After name
    • Format: Name Format: Name and Index (or Name and Counter/Name and Date) → Custom Format: Report → Where: after name → Start numbers at: 1 → choose 00, 000 for padding

Apple guide: Rename files on Mac

macOS: Automator or Shortcuts (Reusable Quick Actions)

Create a right‑click action you can reuse, like “Add date to filename” or “Lowercase + spaces to dashes,” and rename files in bulk with one click.

Automator Quick Action (classic)

  1. Open Automator → New Document → Quick Action.
  2. Workflow receives current: files or folders in Finder.
  3. Add action: Rename Finder Items. When asked to add a copy action, choose “Don’t Add” if you have backups; otherwise add “Copy Finder Items” first.
  4. Choose:
    • Add Date or Time (YYYY‑MM‑DD before/after name)
    • Change Case (lowercase/uppercase/capitalize)
    • Replace Text (spaces → dashes)
  5. Save as “Rename — Date + Dashes”. Then Finder → Quick Actions → use your workflow.

Shortcuts app (modern)

  1. Open Shortcuts → New Shortcut → add actions: Get Selected Files in FinderRename (choose pattern) → optional Repeat with Each for loops.
  2. In Shortcut settings, enable Use as Quick Action. Then access via Finder → Quick Actions.

Apple docs: Shortcuts on Mac

macOS: Terminal (For Power Users)

Command‑line renames are fast and precise, making it easy to rename files in bulk. Open Terminal in the folder (Finder → right‑click folder → New Terminal at Folder).

Spaces → dashes

for f in *\ *; do mv "$f" "${f// /-}"; done

Add prefix to JPGs

for f in *.JPG *.jpg; do mv "$f" "Trip-$f"; done

Number files in name order

i=1; for f in *; do
  ext="${f##*.}"; base="${f%.*}"
  printf -v num "%02d" "$i"
  mv "$f" "${base}_${num}.${ext}"
  ((i++))
done

Using “rename” (if installed)
Install with Homebrew (brew.sh): brew install rename

# Lowercase extensions
rename 's/\.(JPG|JPEG)$/\.jpg/i' *.JPG *.JPEG

# Replace spaces with dashes
rename 's/\s+/-/g' *

Terminal safety tips: Always quote filenames: "$f" handles spaces. Test with echo mv instead of mv to preview. Keep backups for large jobs.

Photos and Media: Rename by EXIF Date (Cross‑Platform)

If you’re organizing photos, naming by the actual capture time beats random camera names. With ExifTool, you can rename files in bulk by their DateTimeOriginal on Windows/Mac/Linux.

Install ExifTool

  • Windows/Mac: exiftool.org (Mac via Homebrew: brew install exiftool)

Rename photos to YYYY‑MM‑DD_HH‑MM‑SS

exiftool '-FileName<${DateTimeOriginal}.%e' -d '%Y-%m-%d_%H-%M-%S' *.jpg

Notes: Uses the photo’s embedded capture time (DateTimeOriginal). ExifTool backs up originals by default (adds _original). Add -overwrite_original to skip backups (only if you’re sure). Works on many media types; check docs for video fields.

Naming Conventions That Actually Work

Great names beat deep folders. When you rename files in bulk, pick a pattern and use it everywhere.

  • Dates first for timelines: YYYY-MM-DD_Project-Name
  • Clients/projects clear: Client_Thing_v01, Client_Thing_v02
  • Status tags (optional): _DRAFT, _REVIEW, _APPROVED
  • Keep it ASCII: letters, numbers, dashes, underscores (portable across systems/scripts)
  • No mystery “final_final2”: Use numbers and increment: _v01, _v02

Pair this with a tidy folder system: Google Drive folder structure.

Undo and Recovery

  • PowerRename: Supports Undo after a rename batch (button or Ctrl+Z), helpful if you rename files in bulk and spot a mistake.
  • Finder: Immediately after a rename, Edit → Undo Rename (Cmd+Z).
  • PowerShell/Terminal: No built‑in undo. Keep backups, or log original→new names so you can reverse if needed.

Common Pitfalls and Fixes

  • Wrong order while numbering: Sort the list first (e.g., by Date Taken for photos). In Finder, use Group/Sort by; in Explorer, add the right columns.
  • Extensions got renamed: In PowerRename, check Exclude file extensions. In PowerShell/Terminal, split name and extension before editing. When you rename files in bulk, protecting extensions avoids broken associations.
  • Path too long (Windows): Deep paths can exceed legacy limits. Rename higher‑level folders shorter first, then try again.
  • Permissions denied: Close files in other apps; ensure you have write access. On Mac, check folder permissions in Get Info.
  • Weird characters from other systems: Normalize to ASCII; replace fancy quotes/spaces with regular ones.

Use Cases: Quick Recipes

Case 1 — Client deliverables, numbered
PowerRename: Set Replace with Deliverable_{num:00} and enable Enumerate. Or Finder → Rename → Format → Name and Index → Custom “Deliverable”. These are reliable ways to rename files in bulk for hand‑offs.

Case 2 — Add project code prefix

Get-ChildItem -File | ForEach-Object {
  Rename-Item $_ -NewName ("ACME_" + $_.Name)
}

Case 3 — Replace “Draft” → “Review”
Finder → Rename → Replace Text: Find Draft, Replace with Review. PowerRename: Search Draft, Replace Review.

Case 4 — Lowercase extensions and spaces→dashes (Mac Terminal)

for f in *; do
  base="${f%.*}"; ext="${f##*.}"
  lower_ext="$(echo "$ext" | tr '[:upper:]' '[:lower:]')"
  new="${base// /-}.${lower_ext}"
  mv "$f" "$new"
done

FAQ

How do I pad numbers with zeros when I rename files in bulk?
PowerRename: use {num:00}. Finder: choose Counter or Index and set digits. PowerShell/Terminal: use format strings ({0:00}) or printf.

Will renaming break my projects if I rename files in bulk?
If software references file paths (video editors, dev projects), renaming can break links. Do major renames before importing, or relink inside the app afterward.

Can I rename folders too?
Yes. Target directories specifically (Explorer: select folders; PowerShell: add -Directory). Test first to avoid breaking linked paths.

Is there a cross‑platform GUI tool?
Yes—third‑party tools like Advanced Renamer (Windows) or NameChanger (Mac). We’ve kept to built‑in or vendor tools for safety and cost.

References & Helpful Resources

Summary: Your Fastest Paths

  • Windows simple: Explorer (F2) for quick numbering—great when you need to rename files in bulk in a hurry.
  • Windows powerful: PowerRename for find/replace, regex, and enumerating; PowerShell for scripted jobs.
  • Mac simple: Finder → Rename with Replace/Add/Format.
  • Mac powerful: Automator/Shortcuts for one‑click Quick Actions; Terminal for advanced patterns.
  • Photos: Use ExifTool to rename by capture date.
  • Always: Test on a small set first before you rename files in bulk; pad numbers; avoid touching extensions.

Next up: Want a weekly system to keep folders clean? You’ll like the 10‑minute routine in Simple Google Drive Folder Structure.

More helpful guides:
Create a Digital Signature for Free
Clear Cache and Cookies Safely
Use Google Docs Offline

Leave a Comment