#1 2019-05-02 21:06

AnimusAstralis
Member
Registered: 2019-05-02
Posts: 1

Change case of a part of filename

I have one another case (I don't think it has been covered in a related topic):

What regular expression should I use to capitalize every word in the first part and capitalize only the first letter in the second part? I want to rename ~6000 files containing articles & edited books. Right now they are named like:

First Author, Second Author 2000 - Long Article Title or Short Title
First Editor, Second Editor (Ed.) 1995 - Long Book Title or Short Title

into:

First Author, Second Author 2000 - Long article title or short title
First Editor, Second Editor (Ed.) 1995 - Long book title or short title

Basically, first part can be skipped, no changes needed there.

Last edited by den4b (2019-05-02 22:46)

Offline

#2 2019-05-02 22:55

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 2,748

Re: Change case of a part of filename

The following two regular expressions rules will do the job:

1) Replace expression "(.+?)\s+-\s+(.+)" with "$1 - \L$2"
2) Replace expression "(.+?)\s+-\s+(.+)" with "$1 - \u$2"

Online documentation:
http://www.den4b.com/wiki/ReNamer:Regular_Expressions

Offline

Board footer

Powered by FluxBB