Moving Parent Folders along with all its contents

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

Moderator: Mr_Noodle

Hi guys! I'm new here so I apologise beforehand if this question has been answered many times before, it feels like a really easy thing to do and it may be that I overcomplicated my understanding of it and now I can't see the obvious.

What I am trying to do is move an entire folder along with its contents to a different folder based on characteristics of the contents (images, movies, pdfs, etc).
To give an example: I have 1 Folder containing a recording and multiple other images or .pngs I will use to edit that recording (sometimes they may be in subfolders of their own). What I want for Hazel to do is dive into the folder and check for a certain Kind of file, in this case Movie. If that file contains a Movie, Then move entire folder Recordings to an archive folder along with it's contents.


What I've tried so far:

1.
Image
2.
Image
with the option of "copy folder structure: from monitored folder only" <I thought this was the option I was looking for as I want to copy just the parent folder from monitored folder -desktop- and not any of the subfolders that may pass the rule as well>

I have tried running it without the AppleScript, changing Kind to Contents and filter it by extension (.mkv/avi/mp4 for movies, .jpg/png images, .mp3/flac for audio etc), separating the action into two rules (1-run AppleScript, 2-Move) but nothing has worked so far.

The code I am getting is quite strange as it passes the rule but doesn't execute the next:
[Processing folder Desktop
Recordings: Rule Search Folder matched.
Done processing folder Desktop]

In the Preview the rule matched is Search Folder but any of the subfiles (e.g. .mkv) do not have any rules next to them. However given the fact that I want to leave them as they are and move the parent folder altogether I don't think they would need a rule next to them. Am I right?

Sorry if I double posted however I have tried to explain it as clear as possible so perhaps this post may be of use to any newbies that try this awesome software :D. Thanks in advance!
call_me_venom
 
Posts: 3
Joined: Sun Feb 22, 2015 6:23 pm

I say get rid of everything you have as it's out of date or incorrect.

Now, if you want to move the folder containing certain types of files, you do not need to have it go into subfolders. Instead, hold down the option key and click the + button to create a new condition. That creates a nested condition. There you can set the target of that condition to be based on the subfiles. What that does is allow you to match a folder based on conditions applied to its subfiles. Try fiddling with that. Also, "Contents contain .mkv" is incorrect as you probably want "Extension" instead of "Contents".
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Wow! Thank you for the super quick reply and the awesome support!
Had no idea about the nested conditions :lol:. I figured that the Contents contain might suggest a name rather than an extension but it didn't work either way so I left it like that out of frustration.
Thank you for helping me save my life from digital clutter!
call_me_venom
 
Posts: 3
Joined: Sun Feb 22, 2015 6:23 pm


Return to Support