我打算使用 Automator 运行一些远程到本地的备份,但需要做一些循环,所以我认为 Applescript 会是一个更好的选择。作为 Applescript 的完全新手,我第一次尝试从给定文件夹中下载具有特定特征的所有文件导致错误:
set today to current date
set yesterday to (today - 1)
tell application "Fetch"
activate
open remote folder "/public_html/books/book_3/_thumbs/Images"
copy every file of folder to beginning of alias "MacintoshHD:Users:franciscaparedes:Desktop:untitled folder:"
whose modification date is greater than yesterday
end tell
这是我的错误:
Fetch got an error: Can’t set beginning of alias \"Macintosh HD:Users:franciscaparedes:Desktop:untitled folder:\" whose «class pMod» > date \"Monday, December 24, 2012 6:37:17 AM\" to every file of folder." number -10006 from insertion point 1 of alias "Macintosh HD:Users:franciscaparedes:Desktop:untitled folder:" whose modification date > date "Monday, December 24, 2012 6:37:17 AM"
任何想法将不胜感激。
-埃里克