Need an Idea: Eject Memory Card After Import

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

Moderator: Mr_Noodle

Need an Idea: Eject Memory Card After Import 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.
Dembo
 
Posts: 9
Joined: Sun Sep 02, 2012 12:21 pm

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.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

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.
Dembo
 
Posts: 9
Joined: Sun Sep 02, 2012 12:21 pm

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.
Dembo
 
Posts: 9
Joined: Sun Sep 02, 2012 12:21 pm

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?
Rodger
 
Posts: 2
Joined: Wed Oct 19, 2016 5:54 pm

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.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Need an Idea: Eject Memory Card After Import 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
Rodger
 
Posts: 2
Joined: Wed Oct 19, 2016 5:54 pm

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.
Dembo
 
Posts: 9
Joined: Sun Sep 02, 2012 12:21 pm


Return to Support