INTERACT FORUM
More => Old Versions => JRiver Media Center 25 for Windows => Topic started by: mvandyke on November 26, 2019, 08:45:29 am
-
I have a rather large library and would like to display files that would require a fixcase (either all in lower case) or in UPPER CASE. I've used the Clean File Property's extensively but it's hard to search through 10's of thousands of files.
Is their an expression or trick to display lower case or upper case fields?
Thanks
-
Sure thing. This expression will show the name in all upper-case:
FixCase([Name], 3)
Lower-case and other fields should follow along.
-
Thanks Matt for the quick turnaround. What is the best way to leverage this expression to show only files that have names in UPPERCASE. I tried adding it a display field but that didn't seem to work.
I'm a long time JR user but getting more involved in fixing metadata now. I've spent a lot of time searching for this in the support forum but unable to locate a fix.
Thanks
Matt
-
There's a IsLowerCase(...) function, but I don't think there is an IsUpperCase function. I could add it to MC26.
-
I just got done adding it to MC26. Thanks for the suggestion.
-
This isn't perfect, but this expression will find any file that has three capital letters in a row in the name field
ifelse(regex([name], /#^[A-Z]{3,}#/, 0, 1), Fix your case!)
If you want to change it from three letters in a row to a different number, change this bit of the expression {3,}
This should find all tracks that don't have a capital letter in the name
if(regex([name], /#^[0-9,A-Z]{1}#/, 0, 1),,all lower)
-
Building on Moe's concept. Here's a regex that should find most all uppercase [Name] fields (song titles):
ifelse(regex([name], /#^[A-Z0-9 \.\+\?\&\(\)\$\#]+$}#/, 0, 1), Fix your case!)
If your song titles contain special characters that I have not accounted for, like the @ or " or ' (for example) then my expression won't work. As a side effect, it's also going to detect song names with only special characters and ONLY numbers or combinations of these three. But it should still be useful.
Change the expression so that A-Z becomes a-z and it will detect the same thing, but in all lowercase.
Brian.
-
Brian, you've got an extra } in there. It should read
ifelse(regex([name], /#^[A-Z0-9 \.\+\?\&\(\)\$\#]+$#/, 0, 1), Fix your case!)
-
That works. Thanks to all for your help.
Matt
-
This could get distilled all the way down to
ifelse(regex([name], /#^[-A-Z\d\s_.+?&()$#]+$#/, 0, 1), Fix your case!)
(Sorry, still trying to improve my regex skills and this was an interesting exercise :))