Page 1 of 1

Automatically mount a disk image?

PostPosted: Sat Dec 15, 2012 8:07 am
by everyotheridwasused
Hi guys,

I'm new to Hazel and loving it so far.

One thing I wanted to know was whether there is an easy way to automatically mount a recently downloaded disk image and, once mounted, trash the downloaded file?

Cheers in advance,

John

Re: Automatically mount a disk image?

PostPosted: Sat Dec 15, 2012 4:40 pm
by a_freyer
everyotheridwasused wrote:Hi guys,

I'm new to Hazel and loving it so far.

One thing I wanted to know was whether there is an easy way to automatically mount a recently downloaded disk image and, once mounted, trash the downloaded file?

Cheers in advance,

John


Well, what have you tried? The default action open works fine for automatically mounting the image. Then move to trash...

Keep in mind that you won't be able to empty the trash fully if you have moved a mounted image there.

Re: Automatically mount a disk image?

PostPosted: Thu Dec 20, 2012 4:36 pm
by everyotheridwasused
Hi,

Thanks for the reply.

That is the trouble I've been having, namely not being able to mount a dmg if it's been moved to Trash. I thought a way to get round this might be to open the dmg then, a minute later, move it to the trash.

However, this doesn't seem to be working. The image mounts as intended, but the original doesn't seem to ever move to the trash.

My rule currently looks like this:-

Image

I apologise for my Hazel inexperience, but if anyone could help, it would be much appreciated!

Re: Automatically mount a disk image?

PostPosted: Thu Dec 20, 2012 4:38 pm
by everyotheridwasused
PS, forgot to mention that I use this rule in addition to the following rule for downloaded dmgs:-

Image

Re: Automatically mount a disk image?

PostPosted: Thu Dec 20, 2012 4:41 pm
by a_freyer
Well, by default the files in the trash are not meant to be opened. I'm not sure why your workflow requires you to access files in the trash, but I'd suggest re-thinking that.

Second, the rules that I provided above do function on my machine. Namely, they mount the image and THEN move to the trash. Does this process not function for you?

What is the order of the two rules that you screenshot above?

Re: Automatically mount a disk image?

PostPosted: Fri Dec 21, 2012 1:44 pm
by Mr_Noodle
Sometimes you won't be able to trash the image if it's mounted. It might be better to add another rule to see if a disk image hasn't been opened in some time and then throw it away.