Waiting for copying to finish before FA triggers...

Hello,

I have a folder action to automatically convert high-res images to low-res. The FA is attached to a folder that sits on the network waiting for folders that contain the high-res images.

My problem is this: Let’s say I have a folder with 10 high-res images in it that amount to 100 MB. When I copy the folder through the network the folder is copied first then its contents. The problem is that the folder action fires but the contents of the folder have not yet “arrived”… Is there anyway that I can wait for the copy to end first before running the script? I have tried -wait-ing but sometimes the images still don’t make it in time. Increasing the -wait- will only hold up folders that may contain one image only…

Can anyone help please??? :frowning:

--> check every 2 seconds if file type is "TIFF", eg,
--> which will only be "TIFF" if the copy is yet finished

on adding folder items to this_folder after receiving alias_list
	repeat with i in alias_list
		repeat
			if file type of (info for i) is "TIFF" then exit repeat
			delay 2
		end repeat
		--> doWatheverWith(i)
	end repeat
end adding folder items to