Is there a way in Applescript to determine when a file copied ( not moved ) into a folder is finished?
It is no problem to use a folder action or even launchd, but it should activate an applescript script.
There is some really good posts about busy files here. Try using those words as search criteria and see what shows up. Search for posts by Adam Bell as well -I remember seeing his name in connection with this topic.
As long as a file is not totally downloaded or copied over a server volume, its status is busy, which is a property of one of the files. -But as I can recall: it isn’t really that simple. But all that you need to know is here, -you just have to find it.
set aFileAlias to choose file
try
--... Lsof lists information about files opened by processes ...
do shell script "lsof " & quoted form of (POSIX path of aFileAlias)
-- still busy
return true
on error
--ready
return false
end try
Thank you all for the current replies. But, like lsof and fs_usage give reply even when the file is or get selected in the finder. I did those things before. But I keep searching and trying. I will check for the options.