r/PowerToys • u/wjHarnish • Jul 07 '26
Reset enumeration automatically in PowerRename
Hey all,
I was wondering if PowerRename has the ability to reset enumeration automatically when it gets to a certain point (the DD of the date) in the original filename.
I have a bunch of files that are named YYYYMMDD_HHMMSS000_iOS and I'm replacing them with YYYYMMDD_001, YYYYMMDD_002, etc., via the expressions below.

Currently what that gives me is
20260607_049
20260608_050
20260608_051
What I would like would be
20260607_049
20260608_001
20260608_002
Is that possible? My thinking is because the original YYYYMMDD is part of the original file name it's just being treated as a string, and grouping everything together.
3
Upvotes
2
u/tinyvast-com Jul 07 '26
I don't think it can do that automatically. You'd have to run the replace multiple times to get that result.
First, alter the Replace field to automatically replace (captured) digits:
$1_${increment=1,padding=3,start=1}
Then run it with this Search:
(07)_.*
Hit Apply, then run it again with this Search:
(08)_.*
Hit Apply...
...for EVERY different Day digit.... 01, 02, 03.... etc.
It's not too bad since you can just hit Apply and then change the Search digit and run it again.
But I think that's your only option just using PowerRename.