You are not logged in.
First, thanks a lot for ReNamer! This is a really fine program.
My problem seems very simple: I want to capitalize every word in folder and files names, and leave all other letters as they are.
Some examples:
laVern Baker ---> LaVern Baker
o'Jays ---> O'Jays
patti laBelle ---> Patti LaBelle
2Pac or XTC are unchanged.
I can't use the "Force case for fragments" option because I have more than 70,000 files and folders to rename and there are too many exceptions to list.
Is there a way to do this?
Last edited by BoraBora (2009-08-23 00:07)
Offline
There is a stupid way to do this but it does what it's suppoesd to
Insert ' ' as prefix - space indicates the new word
Replace every ' a' with ' A'
Replace every ' b' with ' B'
...
you get the picture. In the end just remove the space from position 1.
Offline
I like rockerist's novel idea!
Just one translit rule, followed by a Cleanup rule (select the "Fix spaces" option).
Last edited by narayan (2009-08-23 10:30)
Offline
Nice and simple idea, rockerist!
Unfortunately, I probably do something wrong because it doesn't work. I added 3 rules:
1 - Insert ' ' as prefix.
2 - Transliterate (direction: forward):
' a= A'
' b= B'
etc.
3 - Fix spaces
Here's the result with a test file:
"laVern Baker ¦ lots and Lots of Love.flac" ---> "laVern baker ¦ lots and lots of love.flac"
The capitalized 'V' of LaVern is untouched, which is good, but the 1rst letter of every word is changed to lowercased. What did I missed?
Offline
You may always use a PascalScript:
var
Words : TStringsArray;
TempFileName : WideString;
i : Integer;
begin
TempFileName:='';
Words:=WideSplitString(WideExtractBaseName(FileName), ' ');
for i:=0 to Length(Words) - 1 do
begin
if(Length(Words[i])>0) then
TempFileName := TempFileName + ' '+ WideUpperCase(Words[i][1]) +
WideCopy(Words[i], 2, Length(Words[i])-1)
else TempFileName:=TempFileName + ' ';
end;
FileName:=WideCopy(TempFileName, 2, Length(TempFileName)-1)+
WideExtractFileExt(FileName);
end.
I don't know why the rockerist idea didn't work. I guess it is question to Denis.
Last edited by krtek (2009-08-23 12:17)
Regular Expressions are not as hard to understand as you may think. Check ReNamer's manual or nice Regular Expressions tutorial for more info and start to use full power of applications that use them (like ReNamer, Mp3Tag and so on).
Offline
You may always use a PascalScript:
Your script works perfect! I don't know either why rockerist's idea doesn't work, but it may be me not doing it right.
Thanks a lot to all of you!
Offline
I checked out the translit rule. It actually converts everything to lowercase.
Offline
rockerist's idea will work, but you have to use Replace rule for it, not Translit!
Translit rule does automatic case conversion with an algorithm adopted specifically for transliteration. Translit rule discard the case on the input, i.e. " a= A" is same as " a= a". Case is decided upon the input fragment.
Offline
I knew I was doing something wrong. Thanks for the answer, den4b.
Offline