How select recient modified files

Hi!

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)

thanks

May be useful to look at :

http://www.mactech.com/articles/mactech/Vol.20/20.07/FolderWatching/index.html

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
      activate
      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?

Thanks

Hi,

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

thanks