Page 1 of 1

Moving to folder if folder exists

PostPosted: Fri Apr 03, 2015 4:22 am
by Ursus
Hi

I am currently ripping quite a lot of series and would like to files to be moved automagically :)

Here is what I have:

1. Folders on my NAS -> eg The Big Bang Theory, Banished, Sherlock etc. that is on a share -> TV/Current

2. I then rip a DVD to my RIP folder in the format Series.Name.Season.Episode.MKV eg. Sherlock.S01.E01.mkv, Big.Bang.Theory.S01.E07.mkv

So what I would like is for Hazel to move the files to the correct folder IF a folder exists, if not I would ideally like to create a new folder, if that is too complicated just move to the top folder.

eg. I rip Big.Bank.Theory.S01.E14.mkv -> as Big.Bang.Theory (everything before ".S0" maps to the folder "The Big Bang Theory" move the file to the folder (note that the folder starts with The and the file does not have the The, also note that the files have a . between the words and the folder does not).

I have this working if I create a rule per folder (very easy to setup) - I would love to do it just using one rule!

Thanking you in advance
Ursus

Re: Moving to folder if folder exists

PostPosted: Fri Apr 03, 2015 11:35 am
by Mr_Noodle
You can use patterns if the names match but if you have an arbitrary mapping of names, then you'll have to use a separate rule for each, or use the "Replace text" option.

Re: Moving to folder if folder exists

PostPosted: Sat Apr 04, 2015 5:51 am
by Ursus
but if you have an arbitrary mapping of names, then you'll have to use a separate rule for each, or use the "Replace text" option.[/quote]

Hi

Thank you very much for taking the time to answer my question - I'm not quite sure I know what you mean when you say

Mr_Noodle wrote:You can use patterns if the names match


In my example I used The Big Bang Theory and Sherlock - that would mean that I have the following Folders on the NAS:

The Big Bang Theory
Sherlock

and might have the following 4 files
The.Big.Bang.Theory.S01E01.mkv
Sherlock.S01E01.mkv
Banished.S01E02.mkv
The.Big.Bang.Theory.S05E01.mkv

I am assuming that I would need 2 rules - one for a file that has 4 words and one with only 1 word. I think I have the condition correct but cannot seem to find the action to perform - it cannot be move (as I would like) but "Sort into subfolder" does not seem correct either?

Here is what I have:

https://www.dropbox.com/s/fx831t2xyxaa3 ... e.png?dl=0

do you maybe have an example for me?

What I would like is for the two Big Bang episodes to land in the Big Bang folder, Sherlock in the Sherlock folder and Banished to just be in the main folder.

Thanking you in advance and have a great easter :o)
Ursus Schneider

Re: Moving to folder if folder exists

PostPosted: Mon Apr 06, 2015 2:56 pm
by Mr_Noodle
Well, in your example, you didn't have "The" in the title so I was unclear if you wanted Hazel to know that "Big Bang Theory" mapped to "The Big Bang Theory".

If the names mostly match, instead, just have your custom attribute match everything up to the "S01" (or whatever number). Then, you can use "Replace text" when using the attribute in a pattern to replace the dots with a space.

Re: Moving to folder if folder exists

PostPosted: Tue Apr 07, 2015 4:27 am
by Ursus
Mr_Noodle wrote:Well, in your example, you didn't have "The" in the title so I was unclear if you wanted Hazel to know that "Big Bang Theory" mapped to "The Big Bang Theory".

If the names mostly match, instead, just have your custom attribute match everything up to the "S01" (or whatever number). Then, you can use "Replace text" when using the attribute in a pattern to replace the dots with a space.


Hi

Thanks again for you help but I am just not understanding what you mean, could you maybe use "The Big Bang Theory" example above to create an example for me? Would that be asking too much?

Sorry, but I just am not understanding where I should set the "Replace text" option at all. I think I understand the matching, I am not sure how to tell Hazel to move the file to the folder that I would like - there I can only select the target folder which doesn't offer a Replace text option.

Sorry for being a pain :o(

Greetings from Austria
Ursus

Re: Moving to folder if folder exists

PostPosted: Tue Apr 07, 2015 11:59 am
by Mr_Noodle
You want the replace text part to replace the dots with spaces so that the final name resembles what you want the folder name to be. Try it out on some test files to see what it's doing.

Re: Moving to folder if folder exists

PostPosted: Wed Apr 08, 2015 2:50 am
by Ursus
Mr_Noodle wrote:You want the replace text part to replace the dots with spaces so that the final name resembles what you want the folder name to be. Try it out on some test files to see what it's doing.


Hi.

Thank you again for trying to help but I just don't know what you mean - sorry to waste your time.

Have a good day
Ursus

Re: Moving to folder if folder exists

PostPosted: Wed Apr 08, 2015 4:09 pm
by Mr_Noodle
What part are you having trouble with? Can you be more specific?