Page 1 of 1

Need an Idea: Eject Memory Card After Import

PostPosted: Sun Dec 27, 2015 4:56 pm
by Dembo
Hi all,

I use Hazel to copy photos from a memory card to a staging/import folder on my SSD. Ideally I would like Hazel to eject the card when it's done copying the files. I am pretty sure I can run the eject via an Apple Script, but I am unsure how to trigger the action. I guess I could color all the files I copied but how could I trigger an action once everything on the memory card is colored?

Appreciate any ideas, suggestions.

Re: Need an Idea: Eject Memory Card After Import

PostPosted: Mon Dec 28, 2015 1:00 pm
by Mr_Noodle
You'd probably have to have a rule match the folder containing the files. In such a case, you'd have to make it so that Hazel is monitoring the folder that contains that folder. From there, you can create a nested condition (hold down option while clicking the + button to create a new condition). In the target pop-up that appears there, you can specify "all of its sub-files..." and add a condition to look for the color label.

Re: Need an Idea: Eject Memory Card After Import

PostPosted: Mon Dec 28, 2015 1:51 pm
by Dembo
Interesting idea - I wasn't aware that there is a "all of its sub-files", I shall explore that solution. Thank you for the pointer for now.

Re: Need an Idea: Eject Memory Card After Import

PostPosted: Mon Dec 28, 2015 4:37 pm
by Dembo
Okay, I think I got things up and running. I took four rules, all running on a disk/folder/memory card that is named EOS_DIGITAL (Canon's default):

1. Subfolders
The usual look into subfolders to run the rule with the twist that only subfolders, where "any of its subfiles or subfolders" is not labeled "Green" are looked into - this ensures that the eject rules has a chance to be triggered

2. Eject when done
If all Folders/Files are green, run the Apple Script:

Code: Select all
tell application "Finder"
   eject disk "EOS_DIGITAL"
end tell


3. Set CR2-Files to Green and copy them to the staging directory on the SSD

4. Set Non-CR2 files and directories to Green without copying them

I think this is doing the trick. Thank you for your ideas, I'll monitor the setup whether it runs as supposed to.

Re: Need an Idea: Eject Memory Card After Import

PostPosted: Wed Oct 19, 2016 6:02 pm
by Rodger
I honestly do not mean to hijack this thread but I couldn't find any other post that was similar to mine.

My issue is similar, in that I am using Hazel to automatically move photos from my memory card onto my hard drive (also Canon).

I then have Hazel sort/move files based on exif into folders.

Then Hazel removes the config file on the card.

BUT, I can not get Hazel to release the memory card.
macOS 10.12 (16A323) TRIES to, but I am left having to force eject ... The only way to eject normally is to turn off Hazel first, then the OS can eject.

I don't do any file/folder labelling or colouring. Do 'eject rules' apply to me? If so, could you be a bit more specific?

Re: Need an Idea: Eject Memory Card After Import

PostPosted: Thu Oct 20, 2016 11:12 am
by Mr_Noodle
Please email support. There seems to be an issue with Sierra concerning this. Please include details like what kind of filesystem the card is formatted with.

Re: Need an Idea: Eject Memory Card After Import

PostPosted: Thu Oct 20, 2016 11:29 am
by Rodger
Mr_Noodle wrote:Please email support. There seems to be an issue with Sierra concerning this. Please include details like what kind of filesystem the card is formatted with.


Done, thank you

Re: Need an Idea: Eject Memory Card After Import

PostPosted: Fri Oct 21, 2016 3:36 am
by Dembo
Hi,

I pretty much run the exact workflow you are looking for, albeit under El Capitain.

I am currently on vacation away from my MBP but I can try to post the workflow once I return.