Skip to content

Smart Rename Template Language for PowerRename #40251

@RTMDIYguy

Description

@RTMDIYguy

Description of the new feature / enhancement

Summary Introduce a flexible template language for PowerRename using intuitive tokens such as $FOLDER, $NUM, and $EXT to enable dynamic, context-aware batch renaming. This would allow users to create powerful and reusable rename patterns—all within a single pass.
🖼 Mock-Up UI Concept
• Search Pattern: SampleFile_.*
• Replace Pattern: $FOLDER_$NUM:2$EXT
Preview Panel Example: SampleFile_scenetwo.mov → ProjectClips_01.mov
✅ Option: Reset Counter per Folder ✅ Option: Include Subfolders

Visual Preview included below: Proposed PowerRename UI with token-based rename and dynamic preview.

Image

Scenario when this would be used?

This feature would be useful when renaming media files with variable length name strings across multiple folders with a consistent pattern, such as folder name + counter + extension. It simplifies workflows for content creators, editors, or anyone managing organized assets across structured directories.
✅ Why It Matters
• Efficiency: Eliminates the need for manual or repetitive renaming scripts.
• Clarity: Tokens make complex renaming rules easy to understand and reuse.
• User Empowerment: Puts more control in the hands of non-technical users without sacrificing flexibility.

Supporting information

Here’s a PowerShell-style prototype demonstrating the idea:

$folders = Get-ChildItem "C:\Videos" -Directory

foreach ($folder in $folders) {
    $files = Get-ChildItem $folder.FullName -Filter "SampleFile_*" | Sort-Object Name
    $counter = 1

    foreach ($file in $files) {
        $ext = $file.Extension
        $newName = "{0}_{1:D2}{2}" -f $folder.Name, $counter, $ext
        Rename-Item $file.FullName -NewName $newName
        $counter++
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs-TriageFor issues raised to be triaged and prioritized by internal Microsoft teams

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions