INTERACT FORUM

More => Old Versions => JRiver Media Center 25 for Windows => Topic started by: Antoine. on November 03, 2019, 07:11:06 am

Title: Renaming & Moving a File depending on a specific value
Post by: Antoine. on November 03, 2019, 07:11:06 am
Hello,

I have great use for the RMCF tool, but so far, a pretty limited one as I have tons of different presets depending on the types of file, etc.

I'd love to move files towards a folder depending on wether or not one one of its keywords is "DVD/BD". How can I do that?

If the "If" function works the same way it does in Excel, I'd love to have a rule that works like this:

If([Keywords]=DVD/BD, E:\Vidéos\Films1\, F:\Vidéos\Films2\)

If I put this in the Rule section of Directories (with "base path" clear), it doesn't work properly.

What am I mssing?
Title: Re: Renaming & Moving a File depending on a specific value
Post by: JimH on November 03, 2019, 07:37:46 am
Search for the keyword you want first, then select the results and move those.
Title: Re: Renaming & Moving a File depending on a specific value
Post by: blgentry on November 03, 2019, 02:49:05 pm
Jim has the right idea.

RMCF is not designed to select *which* files to operate on.  It can sort them based on their properties.  Like putting songs into directories named for Album, Artist, etc.  But, in general, what you want to do is find the files you want to work on, and then use the proper RMCF template to do the actual work.

Using a Panes view with a Keywords pane might make this really easy.  Just click on the keyword you want, then select all from the files list and use RMCF on them.

Brian.
Title: Re: Renaming & Moving a File depending on a specific value
Post by: marko on November 03, 2019, 11:38:43 pm
Jim and Brian are correct, kind of...

Base Path will take an expression too, so... assuming you have located the files you wish to work on, and want to do the thing in one pass as opposed to two...

Without prior testing, so pay close attention to the "After" preview paths, the expressions below should answer your question...

Base Path: if(isequal([keywords],DVD//BD,1),E:\,F:\)

Directories: if(isequal([keywords],DVD//BD,1),Vidéos\Films1\,Vidéos\Films2\)

You can get as complex as you want with these. For many years now, I have never changed the expressions I use in this tool. Regardless of media type, I just run the tool, give the "After" column a quick once over and hit OK. The directories and file name rules are very complex though, dealing with every scenario for each media type, so not something that sharing would be of any value to anyone else, but, it's possible, and once you've settled on a filing workflow, truly is a set and forget thing.

-marko.
Title: Re: Renaming & Moving a File depending on a specific value
Post by: Cmagic on November 07, 2019, 12:17:37 pm
Hi Antoine,

My take on that is a bit like Marko, but I decided to hide the complexity of my directory rules in a set of "calculated fields".

So I have something like this in RMCF:
Base Path: [Item Base]
Directories Rules: [Item Path]

Then I can get as complex as I want in my calculated fields:

[Item base]: if(isequal([keywords],DVD//BD,1),E:\,F:\)
[Item path]: if(isequal([keywords],DVD//BD,1),Vidéos\Films1\,Vidéos\Films2\)

Just another way to do the same thing...

Bonne soirée,

Christian
Title: Re: Renaming & Moving a File depending on a specific value
Post by: BryanC on November 07, 2019, 04:54:43 pm
I do something similar to marko as well. Here are my expressions to handle the main media types and subtypes.

Directory rule:
Code: [Select]
IfElse(
  IsEqual([Media Type], Audio),
    If(IsEqual([Media Sub Type],Podcast,0), Podcasts\[Album],Music\[Album Artist (auto)]\/([Year]/) [Album]\),
  IsEqual([Media Sub Type], Movie),
    Movies\IfElse(!IsEmpty([Series,0]),[Series]\)[Name],
  IsEqual([Media Sub Type], TV Show),
    TV\[Series]\Season PadNumber([Season], 2)
)

Filename rule:
Code: [Select]
IfElse(
  IsEqual([Media Type], Audio),
    If(IsEmpty([Disc #],1), 1[Track #] - [Artist] - [Name], [Disc #][Track #] - [Artist] - [Name]),
  IsEqual([Media Sub Type], Movie),
    [Name] /([Year]/),
  IsEqual([Media Sub Type], TV Show),
    [Series] - S[Season]E[Episode] - [Name]
)
Title: Re: Renaming & Moving a File depending on a specific value
Post by: blgentry on November 08, 2019, 02:55:13 pm
BryanC:

What happens when you select a bunch of files and:
Some are Movies.
Some are TV Shows.
Some are Music Videos.

I know what happens to Movies and TV.  THeir directory rule follows your expression.  But what about others that are not defined?  Do they get left where they are?  Renamed in place?  Put into the root of your drive?

Brian.
Title: Re: Renaming & Moving a File depending on a specific value
Post by: BryanC on November 08, 2019, 03:29:20 pm
BryanC:

What happens when you select a bunch of files and:
Some are Movies.
Some are TV Shows.
Some are Music Videos.

I know what happens to Movies and TV.  THeir directory rule follows your expression.  But what about others that are not defined?  Do they get left where they are?  Renamed in place?  Put into the root of your drive?

Brian.

Simply put, I don't have those files. The only subtypes I use are Audio, Podcasts, TV, and Movies. If I did I would just add a generic catch-all.