folder action issue

Hi

I am using folder actions for the first time and have run into a problem. I was wondering wether the action would operate normally if files were thrown at it before the folder action had finished. Would it queue other files in a awaiting room and then call them as necessary. Well after trying this short script it seems no. I have have tried various delays but to no avail.
This script works fine if I throw all the files together in one hit. If I send them to the folder one at a time (from another script using a repeat loop ) it moves a couple of files then gives up.


on adding folder items to thisFolder after receiving addedItems
	set z to alias "Clarks Laptop:Users:JCLAPTOP:Desktop:test:"
	repeat with anItem in addedItems
	--delay 0.2
	tell application "Finder"
		move anItem to z
	end tell
	end repeat
end adding folder items to

As always thanks for help




May I suggest using a stay open script instead of a folder action. Most
prefer this method because folder actions are not reliable.

You can also have the script start when your computer starts up.

Regards,

Craig

Save this as an application with the stay open check box checked.


property repeatTimeInSeconds : 10
property originationFolder : alias (path to desktop as Unicode text) & "origination:" as string
property destFolder : alias (path to desktop as Unicode text) & "destination:" as string

on idle
	tell application "Finder"
		set theFiles to every file of folder originationFolder
		
		repeat with i from 1 to count of theFiles
			set thisFile to item i of theFiles
			move thisFile to destFolder
		end repeat
	end tell
	
	return repeatTimeInSeconds
end idle

Thanks Craig

I have tried some other folder actions and thought they are rather flakey. Glad you confirmed that!