Sorting Movies, TV Shows, and Other Videos

From your noodle to other noodles. Talk about ways to get the most from Hazel. Even exchange recipes for the cool rules you've thought up. DO NOT POST YOUR QUESTIONS HERE.

Moderators: Mr_Noodle, Moderators

Sorting Movies, TV Shows, and Other Videos Fri Dec 04, 2020 10:42 pm • by Dave
I have made a folder that I can toss files and folders into and it sorts them into one of four subfolders:

1, Movies
2, TV Shows
3, Other Videos
4, anything else (which SHOULD be empty because the folder with these rules is meant to only process videos)

I do this for the videos I use in Plex... My movies are all in folders that have their name and release year -- like Star Wars (1977). So the first rule looks for any folder which follows the pattern:
Code: Select all
Full Name matches ...(...)

Matches are put into a subfolder called Movies.

My TV Shows all have filenames ending with S##E## -- their season and episode numbers. I didn't remember if they had spaces between the S## and the E## -- so I made the next rule look for:
Code: Select all
Name matches ...S123...E123

Matches are put into a subfolder called TV Shows.

Then I look for any file where the Kind is Movie and put it into the Other Videos subfolder...

Then -- to toss anything else into the "anything else" subfolder -- I look for anything where the Kind is NOT Folder (to get files)... OR anything which has ALL of these conditions:
Code: Select all
Kind is Folder
Name is not Movies
Name is not TV
Name is not Other Videos
Name is not the rest


As you see -- I named my "anything else" folder "the rest." :)

Anyway -- I have tested this extensively and it works fine. I did have to do one thing (to get around what I consider a bug)... When the rules processed the move D.O.A. (1949), it didn't match my original rule:
Code: Select all
Name matches ...(...)


It didn't match that rule because it considered the Name to be D... It considered the Extension to be O.A. (1949). That's why I used Full Name for that rule -- because that looks at Name + Extension. I am just lucky I have no TV Shows with periods in their names! (But if I did have some, I'd just use Full Name and change the patterns to include the extensions my videos use... ...but hopefully Mr. Noodle will consider this to be a bug, too, and squash it.)

Anyway -- I hope this helps someone somehow! :)

-Dave
Dave
 
Posts: 1
Joined: Sun Nov 15, 2020 11:25 am

I'm having a problem with this.

I typically have TV shows named as per tvshow.title.S01E04.various.other.misc.text.mkv

Ideally I want Hazel to turn that into:

tvshow title S01E04.mkv

For the 'selection' rule I'm trying: Name matches (...)s(123)(...)e(123)(...) which seems to work. The second part of the operation would be to get rid of the characters to the right of the e(123). Is this even possible?
tekguru
 
Posts: 20
Joined: Tue Dec 07, 2021 3:09 pm

You need to use custom attributes to save the parts of the name and then reuse those attributes in a renaming pattern. Search for "match patterns" in the manual.
Mr_Noodle
Site Admin
 
Posts: 11174
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Sorting Movies, TV Shows, and Other Videos Wed Dec 08, 2021 12:05 pm • by tekguru
Quite correct :) I did a lot of reading of the manual this morning and manages to sort it all out!
tekguru
 
Posts: 20
Joined: Tue Dec 07, 2021 3:09 pm


Return to Tips & Tricks - DO NOT POST QUESTIONS