INTERACT FORUM
More => Old Versions => JRiver Media Center 24 for Windows => Topic started by: dreandre on April 07, 2019, 03:34:36 pm
-
Doing some writing today using Rename, Move, & Copy Files.
When I write the Following Rule in Filename:
if(isequal([media sub type],TV Show),S[Season]E[Episode] [Name],[Name] ([year]))
The True Statement is incorrect:
i.e. S01E01 The Sword of Omens).mkv
But the False Statement is Correct:
i.e. I Am Heath Ledger (2017)
It looks as if the IF statement is stealing the first close parenthesis at the end to close out the IF statement, leaving the second parenthesis to add on to the result. Shouldn't the IF statement be using the LAST parenthesis to close out the IF Statement, leaving the first close parenthisis to remain as a part of the False Value?
Am I missing something here?
Thanks as always for your support!!
-
OK, looks like if I just change what I want from "I Am Heath Ledger (2017)" to "I Am Heath Ledger [2017]" it works around the parenthesis confusion...
-
Square brackets, [], can be an issue in file names. I wouldn't use those. Besides, the format "[Name] ([Year]).ext" is most common for movies.
if(isequal([media sub type],TV Show),S[Season]E[Episode] [Name],[Name] /([year]/))
You need to escape the brackets that you want to appear as text, rather than be considered part of the expression. I haven't tested that, but it looks right.
Search for and read about "escape" on this page: https://wiki.jriver.com/index.php/Expression_Language
if(
isequal(
[media sub type],TV Show
)
,S[Season]E[Episode] [Name],
[Name] /([year]/)
)
-
Ah!! Thank you!!! I get this and that solved the issue!!!