#1 : 26/02-24 20:40 Filippo
Posts: 2
|
Hello,
I have a name file: 1x01 name of the file.mp4 I have added the filter to make only the first character uppercase (to have 1x01 Name of the file.mp4) but it does not work, I think because of the 1x01. Is it possible to set to uppercase only the first character after the 5th? Thanks |
#2 : 26/02-24 21:51 Delta Foxtrot
Posts: 285
|
Reply to #1
Hi Phillipo, New case method, set pattern to upper case. Pattern: <Substr:6:1> Cheers, DF |
#3 : 26/02-24 22:28 Filippo
Posts: 2
|
Reply to #2:
Hi DF, I tried but the first letter becomes uppercase in all the iterations of the name. example 1x01 the title of the file Becomes 1x01 The TiTle of The file |
#4 : 26/02-24 23:23 Delta Foxtrot
Posts: 285
|
Reply to #3:
Hmmm.... you're right. It SHOULDN'T happen like that, but it does. I didn't see it because the example you used in your first post didn't contain another character that matched the first substring find. I suspect you've discovered a bug. Well, here's a workaround. Insert the New Case method in your method list exactly as stated. Then add another one, but make it "Set pattern to lower case" and make the pattern expression "<Substr:7:256>". This will take everything after your first title character and pound it back down to lowercase. Oh, the 256 only has to be enough to cover your longest filename, so if you have a crap-ton of files to do it would save you some time to reduce this number (though probably not enough savings to make much difference). Best, DF |
#5 : 28/02-24 08:40 Kim Jensen
Administrator
Posts: 906 |
Reply to #4:
Even though it might seem logical to use <Substr> for this, it is not how it is suppose to work. <Substr> will return a given value and that value will be substituted everywhere in the filename, not only in the position given by the parameters of <Substr> and also not just the first occurrence. In Advanced Renamer there is no easy way to change case for a given position in the filename. But maybe there should. I do see the need for it. For now, what you can do in this case is use "Set pattern to upper case", check "Use regular expressions" and use this pattern: \d\d \w It will uppercase the first word-letter after to digits and a space. It will still match everywhere in the filename, but it is not very likely that this pattern exists more than once. |
#6 : 28/02-24 10:04 Delta Foxtrot
Posts: 285
|
Reply to #5:
Good to know Kim (about the Substr tag). I was thinking the second parameter limited the scope, but it only limits the number of characters that will be replaced throughout the name. :0 BTW, I'm really liking .94 Best, DF |