How select recient modified files


I have files in folder and one automator action that get those files and up it to ftp server, this work with an action folder. But only work if i add new files in this folder, no work if i modified the files that are inside it. How i can made an applescript that get this recent modified files and pass to the next action (up to ftp)


May be useful to look at :

Yvan KOENIG (VALLAURIS, France) mardi 22 mars 2011 22:57:40

Very interesting article but the code:

global theWatchedFolder
set theWatchedFolder to choose folder
on idle
   tell application "Finder"
      set theDetectedItems to every item of theWatchedFolder
      repeat with aDetectedItem in theDetectedItems
         move aDetectedItem to the desktop
      end repeat
   end tell
   if theDetectedItems <> {} then
      display dialog "New items were detected and moved to your desktop."
   end if
   return 1
end idle

The problem seems to be “<>” without those dont work, and with those dont compile…
You know solve it?



replace <> with is not

Consider that occupying the Finder once per second to gather files is a waste of resources.
A launchd agent is a much better solution, because it’s passive and getting notified by the file system

Yes i solve it with Launchd y think that is the best solution, to launch applescripts when something change in a folder