Compare number of items in two folders then move an item if same number
Hello,
I've succesfully created a Folder Action with Automator that once an image file is dropped into a folder called "Funnel", that file will run through some Photoshop processing and then be saved in two different formats in two respective folders (let's call the two folders "A" and "B").
The problem that I'm running into is that I can't drop a bunch of files into the "Funnel" folder at once because it will bog down Photoshop. My solution to this is to create a folder called "Waiting Room" where I will dump a large amount of files. I'm trying to write a Folder Action/AppleScript that will recognize when a file (or files) have been dropped into "Waiting Room", it will then look at the number of items in folders "A" and "B" and if the numbers are the same, that means that Photoshop is done processing the last image it worked on and is free for more work. If that's the case, it will move the last item in the "Waiting Room" to "Funnel" which will then process the file. Because Photoshop will save one format to folder "A" before it saves another format to folder "B" the two folders wont have the same number of items and "Waiting Room" will not be able to transfer another file to "B" until both folders have the same number of items again. This should force it so that Photoshop is only receiving one image file at a time to process.
This is what I've done so far and it isn't working.
I get the following error:
Please help! I'm pretty new to all of this and am guessing at the AppleScript stuff. Thank you!!!
OS X Mountain Lion (10.8.5)