Skip to content

some $-patterns shift counter {} by one character in renamed filename #31837

Open
@frameworker2

Description

Microsoft PowerToys version

0.79.0

Installation method

PowerToys auto-update

Running as admin

No

Area(s) with issue?

PowerRename

Steps to reproduce

search: .* + enable use regex
replace: <patterns as described below>

✔️ Expected Behavior

All examples for file created March 10th 2024. File is first file in batch ({}->0)
replace: <pattern> -> <result>
replace: $YY${}ABC -> 240ABC
replace: $YYYY${}ABC -> 20240ABC
replace: $MM${}ABC -> 030ABC
replace: $MMM${}ABC -> Mar0ABC
replace: $DD${}ABC -> 100ABC
replace: $DDD${}ABC -> Sun0ABC
replace: $DDDD${}ABC -> Sunday0ABC
replace: $YY$MM$DD${}ABC -> 2403100ABC

❌ Actual Behavior

for each of the named $ pattern the counter is shifted back by one character.
replace: $YY${}ABC -> 24A0BC
replace: $YYYY${}ABC -> 2024A0BC
replace: $MM${}ABC -> 03A0BC
replace: $MMM${}ABC -> MarA0BC
replace: $DD${}ABC -> 10A0BC
replace: $DDD${}ABC -> SunA0BC
replace: $DDDD${}ABC -> Sunda0yABC
replace: $YY$MM$DD${}ABC -> 240310ABC0

Other Software

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Area-QualityStability, Performance, Etc.Issue-BugSomething isn't workingPriority-2Bug that is medium priorityProduct-PowerRenameRefers to the PowerRename PowerToy

Type

No type

Projects

  • Status

    No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions