microsoft/PowerToys

[PowerRename] Bulk regex rename needs to include folders

Open

#1391 aperta il 27 feb 2020

Vedi su GitHub
 (10 commenti) (4 reazioni) (0 assegnatari)C# (7978 fork)batch import
Help WantedIdea-EnhancementProduct-PowerRename

Metriche repository

Star
 (133.154 star)
Metriche merge PR
 (Merge medio 14g 20h) (117 PR mergiate in 30 g)

Descrizione

I read that this utility would allow renaming multiple files with regular expressions. There was a checkbox to exclude folders, so I thought if I unchecked that it would include folders. Apparently my expectation of "include folders" doesn't match how the utility works.

I have a lot of files in the form:

  • 2019\02\05\foo.html
  • 2020\04\03\bar.html

I want to rename them to the form:

  • @2019-02-05-foo.html
  • @2020-04-03-bar.html

I figured I would match some regex (\d\d\d\d)\\(\d\d)\\(\d\d)\\(.+)\.html and rename that to @$1-$2-$3-$4.html. It seemed straightforward to me. Looks like the utility can't handle it, though; apparently it only looks at the filename.

You might make this shortcoming explicit in the documentation.

Guida contributor