INTERACT FORUM
More => Old Versions => JRiver Media Center 19 for Windows => Topic started by: InflatableMouse on September 21, 2013, 08:25:30 am
-
I'm using expressions to evaluate whether an album is located in the correct folder:
if(isequal(FileFolder([filename],0),/[[Year]/] clean([Album],3),8),Consistent, Inconsistent)
However, windows refuses to add trailing dots to a foldername so when I have an album ending with one or more dots, they show up as inconsistent.
Using Replace() doesn't work as it would also remove dots in the beginning or halfway a string.
Any tips on how I could trim a random number of dots from the end of an album name?
Thanks.
-
How about RemoveCharacters([Album],.,2)?
-
I overlooked that one, thanks!
-
You might find you need to remove other trailing items, in which case it will be easier to use a regex():
regex(field, /#^(.+?)([.]*)$#/, 1)
Add additional characters if necessary along with the dot inside the brackets: e.g. [._].
The expression can be modified to remove sequences instead any characters in the class.