Embedded Script Running on Wrong File

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

Moderator: Mr_Noodle

Embedded Script Running on Wrong File Sun Oct 07, 2012 11:53 pm • by ptoomey3
Hey,
I am relatively new to Hazel, but I am having an issue with running an embedded script. Again, I am new, but I would have sworn that this used to work the way I thought it would, but now I am having issues. I have a rule that monitors a folder for images. When a new image is found I do the following:

Run an embedded script: chmod 777 "$1" (it is a long story...but it is needed for what I am doing)
Do a "Copy to Folder" action on the file that was chmod(ed) above
Run an embedded script to delete the original file: rm "$1"

It seems that the second embedded script is actually acting on the copied file and not the origional file that was found in the monitored folder. Is that expected behavior?
ptoomey3
 
Posts: 1
Joined: Sun Oct 07, 2012 11:47 pm

Re: Embedded Script Running on Wrong File Mon Oct 08, 2012 11:18 am • by Mr_Noodle
Yes. Actions after a copy action work on the copy. Why not do a move operation?
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support