Working with folder contents

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Working with folder contents Fri Jun 14, 2013 6:43 pm • by FatherOfAlways
Hi,

I have a folder on my Mac that is sort of a dumping ground - I put everything I don't want to deal with at the moment but I want to keep in there.
I would like to devise a system of rules in Hazel to help me sort the mess, but I'm having some problems.

I have in this folder (let's call it 'MESS') a lot of folders containing video files. I would like to move folders that contain video files into a single folder, say 'VIDEO'.
I read the article about diving into subfolders but the problem with that is that I already have two other rules which make the process harder for me.

What I would like to do is this:
1. if there is a subfolder in the folder MESS and that subfolder contains video, move that subfolder with all of its contents to a predefined location
2. if there are video files directly in the folder MESS (that is to say NOT in subfolders), move them to the predefined location
3. same as rule 2, but for pictures/documents/...

Any ideas as to how I would go about doing that?

Thank you for your time.
FatherOfAlways
 
Posts: 24
Joined: Sun Aug 19, 2012 5:47 am

Re: Working with folder contents Mon Jun 17, 2013 10:52 am • by Mr_Noodle
Actually, this is a case where you don't use the subfolder rule. At the top of your conditions, you should see a pop-up saying "the file or folder being matched." Instead, select "any of its sub-files or folders". What that means is any conditions underneath that will match the subfiles instead of the folder itself. The actions will still be performed on the folder though. For video files directly in MESS, you would just leave it as "the file or folder being matched". You can either added a nested condition (option-click the + button) to contains this all in one rule or use two separate rules.

The thing to be careful about is if you have a folder with both videos and some other file type you are sorting, it can only be moved to one place so you need to order your rules to indicate which one takes precedence.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Working with folder contents Tue Jun 18, 2013 4:35 am • by FatherOfAlways
Cool. I got it to work. Thank you very much for answering.
FatherOfAlways
 
Posts: 24
Joined: Sun Aug 19, 2012 5:47 am


Return to Support