Received abort event

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

Moderator: Mr_Noodle

Received abort event Wed Jun 12, 2019 5:03 pm • by erp
I'm trying to have hazel run a terminal command on a file, but couldn't make it work.

I tried "Run shell Script" with the following command:

Code: Select all
exiftool "-FileCreateDate<CreateDate" "-FileModifyDate<CreateDate" $1


But I always get a "Received abort event" error. Any ideas?
erp
 
Posts: 4
Joined: Wed Jun 12, 2019 4:58 pm

Re: Received abort event Thu Jun 13, 2019 10:39 am • by Mr_Noodle
I don't support exiftool so I can't say directly what's wrong. Have you tried running the script outside of Hazel?
Mr_Noodle
Site Admin
 
Posts: 7976
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Received abort event Fri Jun 14, 2019 7:41 am • by erp
The script was missing the full path to Exiftool. Now the script run fine out of Hazel, but still gets the abort error from Hazel.

All I'm trying to do is have Hazel tell Terminal to run the command
Code: Select all
exiftool "-FileCreateDate<CreateDate" "-FileModifyDate<CreateDate" /Volumes/Media/Import/Change\ Create\ Date


I'm open to any suggestions of how to do that (even if not via script).
erp
 
Posts: 4
Joined: Wed Jun 12, 2019 4:58 pm

Re: Received abort event Fri Jun 14, 2019 10:20 am • by Mr_Noodle
Not seeing the full path in that script. Also, not sure what that argument is at the end. It seems your script is ignoring the file passed in (as $1) and instead using some hardcoded path.
Mr_Noodle
Site Admin
 
Posts: 7976
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Received abort event Sun Jun 23, 2019 9:11 am • by erp
I believe my explanation was a little confusing.

What I was trying to say is that in Terminal I use the command
Code: Select all
exiftool "-FileCreateDate<CreateDate" "-FileModifyDate<CreateDate" /Volumes/Media/Import/Change\ Create\ Date"
because I'm processing all the files in the folder. But I could replace the last part with /Volumes/Media/Import/C001.mp4 for example, if I wanted to process just that file.

Now, what I want to do is have Hazel do the heavy lifting for me, so I don't need to open Terminal and type that command. So, in other words, how to I turn the command that I generally type on Terminal into something that Hazel understands (so it can automatically do it for me, even if it does a file at a time). I tried a script like
Code: Select all
exiftool "-FileCreateDate<CreateDate" "-FileModifyDate<CreateDate" $1
but it didn't work.
erp
 
Posts: 4
Joined: Wed Jun 12, 2019 4:58 pm

Re: Received abort event Sun Jun 23, 2019 1:11 pm • by luomat
Try using

Code: Select all
/usr/local/bin/exiftool


(or whatever the correct path is) rather than just `exiftool`.

Also try putting $1 in double-quotes like this: "$1"
luomat
 
Posts: 30
Joined: Wed Mar 10, 2010 3:57 pm

Re: Received abort event Mon Jun 24, 2019 8:06 am • by erp
luomat wrote:Try using

Code: Select all
/usr/local/bin/exiftool


(or whatever the correct path is) rather than just `exiftool`.

Also try putting $1 in double-quotes like this: "$1"


I still get an abort event. The script works fine in automator (with the "$1" replaced by the file path).
erp
 
Posts: 4
Joined: Wed Jun 12, 2019 4:58 pm

Re: Received abort event Mon Jun 24, 2019 10:48 am • by Mr_Noodle
Turn on debug mode: https://www.noodlesoft.com/kb/hazel-debug-mode/

The logs should then show any output from the script. Hopefully it will show more useful errors.
Mr_Noodle
Site Admin
 
Posts: 7976
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support