#1 2016-10-12 20:10

Lauraq
Member
Registered: 2016-10-02
Posts: 76

uppercase / lowercase problem

Hi smile

My Mp3s are like it:

lorenzo jovanotti - La Gente Della Notte.mp3

all the mp3s have uppercase / lowercase in different way. Is possible have, all my mp3 with the first 2 letters of the name and surname of the singer, in uppercase and the title all lowercase without the fist letter, for example:

Lorenzo Jovanotti - La gente della notte.mp3

Thanks smile

Last edited by Lauraq (2016-10-12 20:11)

Offline

#2 2016-10-13 09:53

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,367

Re: uppercase / lowercase problem

There is no simple way to do this, but you can achieve it with a Pascal Script rule:

const
  Delimiter = ' - ';
var
  DelimPos, SecondPartPos: Integer;
begin
  DelimPos := WidePos(Delimiter, FileName);
  if DelimPos > 0 then
  begin
    SecondPartPos := DelimPos + WideLength(Delimiter);
    FileName := WideCaseCapitalize(WideCopy(FileName, 1, DelimPos - 1)) + Delimiter +
      WideLowerCase(WideCopy(FileName, SecondPartPos, WideLength(FileName)));
    if SecondPartPos <= WideLength(FileName) then
      FileName[SecondPartPos] := WideUpperCase(FileName[SecondPartPos])[1];
  end;
end.

Offline

#3 2016-10-13 10:22

Lauraq
Member
Registered: 2016-10-02
Posts: 76

Re: uppercase / lowercase problem

Fantastic, thanks smile

Offline

#4 2018-03-13 12:24

DJKissly
Member
Registered: 2018-03-13
Posts: 4

Re: uppercase / lowercase problem

Good afternoon, Almost the same question. In the early version, without any problems, renamed mp3 files for convenience as follows: "ARTIST - name". The artist or group was in uppercase, and the track name after "-" in lowercase. Now I do not know how to do it. Help me please.

Offline

#5 2018-03-13 12:45

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: uppercase / lowercase problem

Hi DJ and welcome.

FROM:
Artist Name - Track Name.Ext (or any case iteration)
TO:
ARTIST NAME - track name.Ext



Try:
RegEx rule

http://www.den4b.com/wiki/ReNamer:Rules:RegEx
http://www.den4b.com/wiki/ReNamer:Regul … ipulations



Express: ^(.+) - (.+)$
Replace: \U$1 - \L$2




HTH? big_smile


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

#6 2018-03-13 15:57

DJKissly
Member
Registered: 2018-03-13
Posts: 4

Re: uppercase / lowercase problem

Many thanks! Works great!)

Offline

#7 2021-10-22 15:35

Lauraq
Member
Registered: 2016-10-02
Posts: 76

Re: uppercase / lowercase problem

Hi
Sorry if I reopen this old thread. I have the same problem but with songs that have the numbering in front, For example:

01 - lorenzo jovanotti - La Gente Della Notte.mp3

to

01 - Lorenzo Jovanotti - La gente della notte.mp3


Thanks smile

Offline

#8 2021-10-22 20:06

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: uppercase / lowercase problem

FROM:
01 - lorenzo jovanotti - La Gente Della Notte.mp3
TO:
01 - Lorenzo Jovanotti - La gente della notte.mp3


Try this two rules:
1) Case: Capitalize every word (skip extension)
2) Regular Expressions: Expression "^(.+ - )(.)(.+)$" Replace with "$1\U$2\L$3" (skip extension)




Explanation:
01 - lorenzo jovanotti - La Gente Della Notte <Start
1) Case: Capitalize every word (skip extension)
01 - Lorenzo Jovanotti - La Gente Della Notte <intermediate result
2) Regular Expressions: Expression "^(.+ - )(.)(.+)$" Replace with "$1\U$2\L$3" (skip extension)
(.+ - ) . . . > Group1: "01 - Lorenzo Jovanotti - "
(.) . . . . . .> Group2: "L"
(.+) . . . . .> Group3: "a Gente Della Notte"
$1 ........ give me content from Group1, case as it is: "01 - Lorenzo Jovanotti - "
\U$2 ..... give me content from Group2, the "L" and use upper case format: "L"
\L$3 ..... give me content from Group2, and use lower case format: "a gente della notte"
01 - Lorenzo Jovanotti - La gente della notte.mp3 <End


Note: The "\U" for "$2" is not really need, but used just for an example in case somebody need it for his/her issue.


See our RegEx reference for more details
>> http://www.den4b.com/wiki/ReNamer:Regul … ipulations



HTH? big_smile


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

#9 2021-10-22 21:10

Lauraq
Member
Registered: 2016-10-02
Posts: 76

Re: uppercase / lowercase problem

Fantastic, thanks! ^_^

Offline

Board footer

Powered by FluxBB