INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Renaming & Moving a File depending on a specific value  (Read 1027 times)

Antoine.

  • World Citizen
  • ***
  • Posts: 180
Renaming & Moving a File depending on a specific value
« 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?
Logged
Server: Windows 10 Pro (64bits) & MC26 - Caselabs Mercury S5 - Corsair HX1000i - ASRock Z97M OC Formula - Intel i7-4790t - 16Gb - Crucial M500 960GB - MSI GTX 960 Gaming 4G - RAID5 : WD Red 4TB (6x) + Adaptec 6805 - JBOD : WG Green 4TB (4x) - Hauppauge WinTV-HVR-2200 - Kef Egg.

HTPC: Windows 10 Pro (64bits) & MC25 - Streacom F12C  - Streacom FLIRC - Corsair HX750i - ASRock Z97 Extreme4 - Intel i5-4690s - 16Gb - Crucial M500 480GB - MSI GTX 960 Gaming 2G - Asus Essence STX II.

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?
Re: Renaming & Moving a File depending on a specific value
« Reply #1 on: November 03, 2019, 07:37:46 am »

Search for the keyword you want first, then select the results and move those.
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Renaming & Moving a File depending on a specific value
« Reply #2 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.
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: Renaming & Moving a File depending on a specific value
« Reply #3 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.

Cmagic

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1196
  • Enjoying life with a little music....
Re: Renaming & Moving a File depending on a specific value
« Reply #4 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
Logged
Until the color of a man's skin is of no more significance
than the color of his eyes.
Bob Marley (War)

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2661
Re: Renaming & Moving a File depending on a specific value
« Reply #5 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]
)
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Renaming & Moving a File depending on a specific value
« Reply #6 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.
Logged

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2661
Re: Renaming & Moving a File depending on a specific value
« Reply #7 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.
Logged
Pages: [1]   Go Up