AppleScript for kicking off batch process on folder?

This area contains the messages from the old Yahoo gcmac group after the port.
Karsten Wolf
Posts: 0
Joined: Wed Dec 07, 2011 7:53 pm

Re: AppleScript for kicking off batch process on folder?

Post by Karsten Wolf »

Am 26.05.2012 um 20:59 schrieb Peter Bickford: > I think at this point, my deeper questions are around the actual > implementation of the AppleScript-Is it possible to kick off a > preformed > batch from one, or is it really a matter of iterating all the files/ > folders > in a loop and setting the properties for each file as we go? (I > worry that > for 300,000+ files, the iterative approach would be super slow). No, it's not slow. I have a converter app that uses GCs convert file and the set up for each file is next to nothing compared to the work GC has to do for each file. My app resizes and watermarks pictures so YMMV. To properly set up the 'convert file' command you need to look at GCs dictionary with something like ASDictionary ( http://sourceforge.net/ projects/appscript/files ) which says about the convert file command: convert file -- convert a file using a batch setting to the destination folder using batch file specification -- batch settings file to folder file specification -- destination folder So you need FSSpecs to specify the different files and the batch has to be saved to disk. It's a good idea to set the destination file type in the batch. The processing for each file should look something like this with your actual values for "path:to:*": set SOURCEPICTURE to ( "path:to:pict" as file specification) set BATCHFILE to ( "path:to:batchfile" as file specification) set DESTINATIONFOLDER to ( "path:to:folder" as file specification) convert file SOURCEPICTURE using batch BATCHFILE to folder DESTINATIONFOLDER
Post Reply