watch a folder

This area contains the messages from the old Yahoo gcmac group after the port.
Post Reply
Willie Strickland
Posts: 0
Joined: Wed Mar 19, 2014 6:03 am

watch a folder

Post by Willie Strickland »

I have a camera that I can run to take all-sky images.  I setup a batch to convert, annotate & copy to a new directory resulting in PNG images such as the image below.  These images start as *.fits files which I can easily convert using GC but not with Applescript or Automator because they are not recognized as image files.I cannot figure out how to watch the folder and convert the new images as they arrive.  I must manually select them and run the batch.Is it possible to have a GC batch that watches a folder and operates on new files added to that folder?  Also, is it possible to use a batch as a folder action?Thanks,Willie
thorstenlemke
Posts: 0
Joined: Fri Dec 30, 2016 12:00 pm

Re: watch a folder [1 Attachment]

Post by thorstenlemke »

Dear Willie, currently the only solution is to write an applescript which does watch a folder. The AppleScript can call GraphicConverter on the command line with the batch settings. Thorsten On 19.03.2014, at 05:03, Willie Strickland <cwskas@gmail.com> wrote: > I have a camera that I can run to take all-sky images. I setup a batch to convert, annotate & copy to a new directory resulting in PNG images such as the image below. These images start as *.fits files which I can easily convert using GC but not with Applescript or Automator because they are not recognized as image files. > > I cannot figure out how to watch the folder and convert the new images as they arrive. I must manually select them and run the batch. > > Is it possible to have a GC batch that watches a folder and operates on new files added to that folder? Also, is it possible to use a batch as a folder action? > > Thanks, > > Willie > > > <20140301-2x-15s_040.png>
cwskas
Posts: 0
Joined: Tue Nov 29, 2005 7:55 am

Re: watch a folder [1 Attachment]

Post by cwskas »

I tried that, but since AppleScript doesn't recognize the fits file as an image file, it passes the file but then nothing happens.  The batch doesn't run.  I know next to nothing about applescript, but was modifying scripts that I found online which did similar actions.I remember now I was using an Automator workflow.  It would do just what I wanted if I put a file in the folder which classified as an Image file, but would not work with fits files.Thanks for the response.  I will keep poking around and see what I can find.Willie
thorstenlemke
Posts: 0
Joined: Fri Dec 30, 2016 12:00 pm

Re: watch a folder

Post by thorstenlemke »

Hello,I am confused. Just fetch the file list with AppleScript and call GC. It doesn’t matter if it is an image file for AppleScript or not.Thorsten On 19.03.2014, at 09:56, <cwskas@gmail.com> <cwskas@gmail.com> wrote: I tried that, but since AppleScript doesn't recognize the fits file as an image file, it passes the file but then nothing happens.  The batch doesn't run.  I know next to nothing about applescript, but was modifying scripts that I found online which did similar actions.I remember now I was using an Automator workflow.  It would do just what I wanted if I put a file in the folder which classified as an Image file, but would not work with fits files.Thanks for the response.  I will keep poking around and see what I can find.Willie
Christopher Stone
Posts: 0
Joined: Sat Jun 19, 2004 11:47 pm

Re: watch a folder

Post by Christopher Stone »

On Mar 19, 2014, at 04:01, Thorsten Lemke <lemke@lemkesoft.de> wrote: I am confused. Just fetch the file list with AppleScript and call GC. It doesn’t matter if it is an image file for AppleScript or not.______________________________________________________________________He did mention that he doesn't know much about AppleScript...  :)AppleScript is useful for many things, but it's folder-watching capability (folder actions) stink.Take a look at Hazel.https://www.macupdate.com/app/mac/22694/hazel--Best Regards,Chris
Post Reply