The Hot Folder daemon, hotfd(1M), is generally used to turn a directory into an area where PostScript and PDF files are quickly passed on to print queues. The hotfd(1M) daemon can also be configured to do more than simply passing PostScript and PDF to print queues. An option, (Custom processing), in the Spool to print queue pop-up list exists for this purpose.They allow you to either pass on a file or to stream a file through a pipe to Standard Input. Which you choose really depends on how the script or program you call works. Please see the hotfd(1M) manual page for further information.Example: custom processing using the ex option (reading from a file argument)When you use its ex flag, the Hot Folder daemon can pass files (PostScript or not) to scripts, that then can perform a variety of actions. The following example shows how to use a Hot Folder to automatically create GIF files from PostScript, PDF or other image files:
2.
3. Enter a command in the Enter custom processing command that will read from a file argument type-in box.Information in this type-in box will automatically reconfigure the hotfd(1M) daemon’s configuration file, /var/adm/appletalk/hotfolderconf on Unix systems and C:\Program Files\Xinet\FullPress\Admin\hotfolderconf on Windows, so that it calls the script whose name you enter here, using the daemon’s ex flag. (In this example, we’ve used a script called GIFscript. Step 4. provides more information about the actual script.)In other words, when you submit a command using this type-in box, you will automatically update the hotfd(1M) configuration file:Note that on Windows, cmd.exe /c has been prepended before the path to your script so that DOS knows to run a batch file. Further, note the syntax for the colon in the path for the script: c: is denoted as cCoLOn. (This capitalization is significant.)Inside the script, you can refer to those arguments as $1 and $2 (Unix) or %1 and %2 (Windows), or anything else that refers to command-line arguments. Do not, however, try to evaluate $f or $F—that won’t work.• On Unix:The d variable sets the output directory for the new files. The :r will strip out the suffix (which might be .eps, .dcs, etc.) so that the new suffix .gif can be added.Note: If you are working on a OS X system, be sure not to run the csh command with a -fx flag. If you do, the script will not be run when called by hotfd(1M).The d variable sets the output directory, and the e variable provides the name of the output file itselfUntil then, the output files will retain their original extensions, e.g., if you convert image.jpg, the output file will be named image.jpg.gif.
5. Engage any of the remaining configuration options on the Edit Hot Folder page that apply.
6.
• Drop images of various file types into a Hot Folder, then call imagetox(1) to convert a copy of each one into a GIF.
• Drop files into a Hot Folder, then have a script employ ksmv (see kats(1)) to move files to an area which will be archived nightly.
• Print to a PDF queue, then make that queue’s destination a Hot Folder that will copy the PDF file to a saved location. (While the same results could be achieved with a Success destination that was also a PDF queue; the PDF would be made twice.)