Skip to main content
PowerRename is a powerful bulk renaming tool for Windows File Explorer that supports search and replace with regular expressions. Preview your changes before applying them and rename multiple files simultaneously.

Activation

1

Select Files

In File Explorer, select one or more files or folders you want to rename.
2

Open PowerRename

Right-click the selected items and choose PowerRename from the context menu.
3

Configure Rename

Enter search and replace patterns, enable options, and preview changes.
4

Apply Changes

Click Rename to apply the changes to all selected files.
PowerRename appears as a context menu item only when files or folders are selected in File Explorer.

Core Features

Search and Replace

Basic text search and replace:Search for: vacationReplace with: holidayResult: vacation_2024.jpgholiday_2024.jpg

Regular Expressions

PowerRename supports full regex patterns for advanced renaming operations.
Check the Use regular expressions option to enable regex mode.
Regular expressions are powerful but complex. Test patterns carefully on a few files before applying to many files.

Common Regex Patterns

Search for: ^(.+)
Replace with: PREFIX_$1

Example: file.txt → PREFIX_file.txt

Renaming Options

  • Match all occurrences: Replace every match in the filename (not just the first)
  • Case sensitive: Treat uppercase and lowercase as different
  • Use regular expressions: Enable regex pattern matching
Choose what parts of the filename to rename:
  • Filename + Extension: Rename the entire filename
  • Filename only: Keep file extensions unchanged (recommended)
  • Extension only: Change only file extensions
  • Make uppercase: Convert matched text to UPPERCASE
  • Make lowercase: Convert matched text to lowercase
  • Make titlecase: Capitalize The First Letter Of Each Word
  • Include files: Rename files
  • Include folders: Rename folders
  • Include subfolders: Process items in subdirectories
  • Exclude items: Skip specific files or folders using patterns

Live Preview

PowerRename shows a live preview of all rename operations before you apply them.
The preview list shows:
  • Original filename (left column)
  • New filename after rename (right column)
  • Checkboxes to include/exclude individual items
  • Highlighted differences between old and new names
Changes highlighted in the preview show exactly what will be modified. Review carefully before clicking Rename.

Pattern Snippets

PowerRename includes pattern snippets for common renaming scenarios. Implementation: /src/modules/powerrename/PowerRenameUILib/PatternSnippet.cpp

Variable Substitution

Use special variables in the “Replace with” field:
VariableDescriptionExample
$numSequential number (1, 2, 3…)file_$num.txtfile_1.txt
$001numZero-padded numberfile_$001num.txtfile_001.txt
$dateCurrent date (YYYY-MM-DD)backup_$date.zip
$timeCurrent time (HH-MM-SS)log_$time.txt
$parentParent folder name$parent_file.txt
Variables are case-sensitive and must be typed exactly as shown.

Advanced Use Cases

Rename vacation photos with dates:Files:
IMG_0001.jpg
IMG_0002.jpg
IMG_0003.jpg
Pattern:
  • Search: IMG_(\d+)
  • Replace: Vacation_2024_$1
  • Use regex: Yes
Result:
Vacation_2024_0001.jpg
Vacation_2024_0002.jpg
Vacation_2024_0003.jpg
Remove website names and tracking codes:Files:
document (1).pdf
report_final_v2 copy.docx
image-download-123abc.png
Pattern:
  • Search: \s*\(\d+\)|\s+copy|-download-[a-z0-9]+
  • Replace: (empty)
  • Use regex: Yes
Result:
document.pdf
report_final_v2.docx
image.png
Add sequential numbering to files:Pattern:
  • Search: ^(.+)(\..+)$
  • Replace: $1_$001num$2
  • Use regex: Yes
Result:
chapter.txt → chapter_001.txt
chapter.txt → chapter_002.txt
chapter.txt → chapter_003.txt
Rename .txt files to .md:Settings:
  • Search: txt
  • Replace: md
  • Apply to: Extension only
Result:
readme.txt → readme.md
notes.txt → notes.md
Extract date from filename and reorganize:Files:
Report_2024-03-15_v1.docx
Report_2024-03-16_v1.docx
Pattern:
  • Search: Report_(\d{4})-(\d{2})-(\d{2})_v\d+
  • Replace: $1$2$3_Report
  • Use regex: Yes
Result:
20240315_Report.docx
20240316_Report.docx

Regex Reference

Common Patterns

PatternMatchesExample
.Any single charactera.c matches abc, a1c
*Zero or more of previousab* matches a, ab, abb
+One or more of previousab+ matches ab, abb
?Zero or one of previousab? matches a, ab
\dAny digit (0-9)file\d matches file1
\wWord character (a-z, 0-9, _)\w+ matches file_1
\sWhitespace (space, tab)\s matches
^Start of string^file matches start
$End of stringtxt$ matches end
[abc]Any character in brackets[aeiou] matches vowels
[^abc]Not in brackets[^0-9] matches non-digits
(...)Capture group(\d+) captures numbers
$1, $2Backreference to groupsUse captured text

Special Escape Sequences

SequenceMeaning
\.Literal dot
\\Literal backslash
\( \)Literal parentheses
\[ \]Literal brackets
\^ \$Literal ^ or $
Use regex101.com to test your patterns before applying them in PowerRename.

Configuration

Settings

Configure PowerRename behavior in PowerToys Settings:
1

Enable/Disable

Toggle PowerRename on or off in PowerToys Settings > PowerRename.
2

Default Options

Set default values for:
  • Use regular expressions
  • Case sensitivity
  • Match all occurrences
3

Interface Options

  • Show PowerRename icon in File Explorer
  • Enable extended context menu

Safety Features

PowerRename operates directly on files and folders. Changes cannot be undone automatically.
  • Always review the preview list carefully
  • Test on a few files first before bulk operations
  • Backup important files before major renaming
  • Check that file extensions are preserved (if desired)
  • Monitor the progress indicator
  • Don’t interrupt the process on network drives
  • Watch for error messages or conflicts
  • Verify results in File Explorer
  • If mistakes occur, use Ctrl+Z in File Explorer immediately
  • Some applications may need to be restarted to recognize renamed files

Troubleshooting

  • Ensure PowerRename is enabled in PowerToys Settings
  • Restart File Explorer: Right-click taskbar > Task Manager > Restart “Windows Explorer”
  • Check if files are selected (PowerRename only appears with selections)
  • Verify “Use regular expressions” checkbox is enabled
  • Check pattern syntax using online regex tester
  • Escape special characters: . * + ? ^ $ ( ) [ ] { } \ |
  • Check if files are currently open in other applications
  • Verify file permissions (read-only files cannot be renamed)
  • Look for error messages in the preview list
  • Some system files may be protected from renaming
  • Ensure variables are typed exactly: $num, $date, etc.
  • Variables are case-sensitive
  • Some variables only work in replace field, not search field

Source Code

Location: /src/modules/powerrename/
  • Context menu: PowerRenameContextMenu/
  • UI library: PowerRenameUILib/
  • Pattern snippets: PowerRenameUILib/PatternSnippet.cpp
  • Explorer integration: PowerRenameUILib/ExplorerItemsSource.cpp

Build docs developers (and LLMs) love