Open Program when DVD volume is mounted

Talk, speculate, discuss, pontificate. As long as it pertains to Hazel.

Moderators: Mr_Noodle, Moderators

Open Program when DVD volume is mounted Mon Sep 28, 2020 5:05 pm • by killerspots
Hello everyone,

I am pretty new to Hazel and was wondering of how to accomplish the following task:

I want Hazel to open a specific programme when a DVD or a BluRay is mounted via my disc-drive.
So I though of doing this by: If the mounted folder contains a VIDEO_TS folder, open programme XX, if the mounted folder contains a a BDMV file, open programme YY. Would this work or is there maybe even an easier way of doind this? And I was wondering of how to access the volume folder with Hazel.

any thanks for your help.
killerspots
 
Posts: 8
Joined: Mon Sep 28, 2020 5:00 pm

Re: Open Program when DVD volume is mounted Tue Sep 29, 2020 9:58 am • by Mr_Noodle
If you can find the Volume folder in Finder, you can drag it into Hazel to monitor. While you can use a nested condition to look for certain folders/files on the volume, the problem is that every drive on the system is under Volumes so it would cause a huge scan of every file available. You might need to come up with a shellscript which can do some queries on the mounted volume to see if, in the very least, it's removable media. Even better if it can identify a DVD or BluRay.
Mr_Noodle
Site Admin
 
Posts: 11247
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:If you can find the Volume folder in Finder, you can drag it into Hazel to monitor. While you can use a nested condition to look for certain folders/files on the volume, the problem is that every drive on the system is under Volumes so it would cause a huge scan of every file available. You might need to come up with a shellscript which can do some queries on the mounted volume to see if, in the very least, it's removable media. Even better if it can identify a DVD or BluRay.



Well, I have to admit I thought it is easier than that. :)
I am not familiar with shell scripting at all. Is there someone who could help me out here?
Many thanks in advance...
killerspots
 
Posts: 8
Joined: Mon Sep 28, 2020 5:00 pm


Return to Open Discussion