Batch Rename Images with AI and PowerRename: Keep Dates, Numbers and Extensions

Use eight filenames to draft a regex with AI, preview three changes in PowerRename and check case, destination collisions and recovery—without uploading the original images.

Renaming IMG_20261016_001.jpg to autumn-20261016-001.jpg is easy. Doing it for hundreds of assets while preserving dates and sequence numbers, and leaving screenshots, documents and previously delivered files alone, takes a clearer rule. Instead of giving AI control of the asset folder, ask it for a naming rule and run that rule in a local tool with a preview.

This tutorial uses PowerRename in Microsoft PowerToys for a fictional autumn campaign. It is intended for ecommerce operators, photography assistants, designers and administrative staff. No script or image upload is required: the AI only needs sanitized filename examples. The deliverables are a rule, eight expected mappings and a recoverable delivery copy—not just a message saying the batch succeeded.

Why use a local renamer rather than upload a folder?

PowerRename is a bulk renaming utility in Microsoft's free, open-source PowerToys. It executes rules; AI can help draft and explain them. These are separate roles: PowerRename is not a vision model that names images from their contents. If you only need to replace a fixed word, ordinary search and replace is enough. There is no need to add complexity just to involve AI.

Here we need to preserve a date, a three-digit number and an optional _edit marker, so capture groups are useful. The site's Claude and Gemini listings offer possible assistants for drafting the expression; use an account you already have and check its current limits. Replace client names, unreleased project codes and full disk paths with fictional examples before sending a prompt.

Follow Microsoft's installation instructions to the Microsoft Store or official GitHub download channel, choosing the installer for your device architecture. If your organization restricts installations, ask its administrator rather than disabling protection or running an unofficial portable build. This tutorial does not depend on a fixed release number. Button translations may vary; consult the current interface and official PowerRename documentation.

Eight filenames define the scope

Put eight disposable copies in a separate test folder and give them the names below. Their extensions should match the actual formats; do not disguise text files as images. Our rule accepts uppercase IMG_, eight date digits, an underscore and exactly three sequence digits, optionally followed by _edit. It changes only the filename stem, preserving the extension and its case.

Original filenameExpected result
IMG_20261016_001.jpgautumn-20261016-001.jpg
IMG_20261016_002.PNGautumn-20261016-002.PNG
IMG_20261016_003_edit.jpgautumn-20261016-003_edit.jpg
IMG_20261016_04.jpgUnchanged
img_20261016_005.jpgUnchanged
screenshot.pngUnchanged
brief.txtUnchanged
IMG_20261016_006_preview.jpgUnchanged

Only three rows should change. Two-digit numbers, a lowercase img_ prefix and a _preview suffix are not things to “fix while we are here.” Leave them for a separate decision. If the business needs them included, define another explicit rule. Eight digits are only a structural date check: a value such as 20261340 can still match and needs separate validation.

Replace “organize my files” with a reviewable request

Give the assistant the tool, scope, positive and negative examples, and prohibited actions. Copy this prompt and attach all eight original names and expected outcomes:

I am renaming files in Windows PowerToys PowerRename. Process the filename stem only, excluding the extension. Match uppercase IMG_, eight date digits, an underscore, three sequence digits and an optional final _edit. Output autumn-date-number, preserving the optional _edit. Give the Search for and Replace with fields using default ECMAScript regex syntax. Use replacement references such as $1, not Python-style backslash references. Do not write scripts, move or delete files. Show all eight expected outcomes and explain case sensitivity, anchors and nonmatches. Flag destination collisions, extension handling and backups. Do not claim eight digits prove a valid calendar date.

If the assistant offers .* to match everything, or recommends deleting nonconforming files, ask it to return to the examples. You want a bounded transformation, not an autonomous file manager. Save the prompt and the two approved fields for future work, but preview again whenever the sample set changes.

Fill in these two PowerRename fields

Enable PowerRename in PowerToys settings. Select the eight test copies in File Explorer and find PowerRename in the context menu; depending on the Windows menu layout, check “Show more options.” If it is absent, check the module and installation rather than repeatedly granting administrator access to unfamiliar programs.

Search for:

^IMG_([0-9]{8})_([0-9]{3})(_edit)?$

Replace with:

autumn-$1-$2$3

Choose “Filename only.” Enable regular expressions, case sensitivity and “Match all occurrences.” Include files, exclude folders and subfolders, and turn off enumeration and additional case conversion. This example does not need Boost extensions. Options can retain previous values, so inspect them each time rather than pasting two strings and immediately applying the operation.

^ and $ anchor the whole stem. Group one retains the date digits, group two the sequence digits and group three the optional _edit. The replacement references $1, $2 and $3 refer to those groups; an absent third group contributes nothing. The expression excludes extensions because “Filename only” does that separation. If the selected scope includes extensions instead, the end anchor prevents these examples from matching as intended.

Preview the three changes—and check unselected files

Compare every row against the table: three new names and five unchanged names. Check that .PNG retains its case, 003_edit retains its marker and 001 retains its leading zeros. The preview can show only items that will change; return to the full selection when checking coverage. An item hidden by a filter has not necessarily been deleted.

Next, look for destination collisions. If the folder already contains autumn-20261016-001.jpg, the first image's target conflicts with it even when the existing file is not selected. Stop and establish whether these are the same asset, different revisions or separate deliveries. Do not rely on automatic numbering or overwriting. Define a separate batch prefix where appropriate, then regenerate and review the complete mapping.

We checked these eight mappings as strings using an ECMAScript regular expression: three change and five do not. A second pass leaves the results unchanged, and we checked an intentionally constructed destination collision. That is not a PowerRename GUI test and does not cover permissions, synchronization or file locks. Previewing copies on your own computer remains necessary.

Leave a recovery path before applying the batch

After the test passes, copy the production assets into a delivery folder and rename only that copy. Renaming does not convert file formats or inspect image contents. A website, editing project or asset system may reference existing paths, so confirm that its users can accept the new paths. A synchronized folder can propagate changes to other devices; prefer an independent local copy for the initial checks.

After applying, verify the total file count, open three images and sort by name to look for omissions. If you notice a mistake immediately, try File Explorer's “Undo Rename” or Ctrl+Z. Do not treat undo as a permanent backup: subsequent operations, application state and synchronization can complicate recovery. Unchanged originals and an old-to-new mapping remain the more dependable recovery basis.

The handoff checklist needs only six items: originals retained; eight sample mappings correct; no destination collisions; extensions unchanged; counts and spot checks passed; recipient accepts the new paths. AI's useful contribution is turning a vague request into a checkable rule. Scope confirmation and a human review before applying it are still essential.

Independently prepared by AI Islands using official product pages and public sources. Features and pricing may change; check official sites for current information.