# Can applescript "watch" a folder & create PDFs from files that appear in it?



## Fahrvergnuugen (Jan 17, 2004)

I would be awesome to have an action that converted items to PDFs as soon as they appear in a folder. Can an applescript "watch" a folder?

I say watch, because the files are being moved there by a remote user or script - which means the finder isn't involved.


----------



## Arden (Jan 17, 2004)

To do this, you'd enable the Apple Script as a folder action.


----------



## habilis (Jan 17, 2004)

At work we run an applescript on a G4 dual 1.25GHz web server that opens, checks the contents of a folder, and then closes the folder once every second, if it finds a text file file, it opens it in Quark and flows in the text file on a certain designated business card template using style sheets to alter type and point sizes, from there Quark distills the file into a PDF then instantly uploads it to the end-user so they can see exactly how their business card will look. All controlled by Applescript.

It takes a total of about 5 seconds.


----------

