General Question

bpeoples's avatar

Printing via Folder Actions?

Asked by bpeoples (2551points) December 4th, 2007

I’m looking for a method on a Mac to take JPEGs in a folder and send them to a photo printer. But wait—the JPEGs will be continuously added to this folder (i.e., tethered shooting), so in theory the script will want to look for new files, print them, and then remove them from the folder.

Probably easy enough, but my previous attempts to do folder actions “on change” didn’t work so well.

One option is to just have a script that loops every second, and takes all files in the folder and throws them to a printing application? That’s how I’d do it on a unix box =)

Thanks!

Observing members: 0 Composing members: 0

3 Answers

bpeoples's avatar

Answering my own question…

I’m doing this (currently) by creating an Automator Task that searches a specific folder for all images, then prints those images using Preview, and then moves the images into another folder.

This is then saved as an application, at which point I’m using a shell script that goes something like this:

while true
do
sleep 1
./print-all
done

The sleep 1 is basically just there to slow down the loop when there are no images, and doesn’t add much overhead to the loop. In my small scale tests, this has proven to work okay, we’ll see how it goes in the live production test with ~300 images on Sunday.

Response moderated (Spam)
Response moderated (Spam)

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther