我是 Applescript 的新手,正在尝试整理一个简单的脚本来在运行时备份一些文件夹。我的脚本如下:
on run
tell application "Finder"
set backupFolder to make new folder at "BACKUP" with properties {name:(year of (current date) as string) & "-" & (month of (current date) as integer as string) & "-" & (day of (current date) as string)}
duplicate folder "~/Test" to backupFolder
end tell
end run
但是,当我运行脚本时,我收到一条错误消息:
Finder got an error: Can’t set folder "2013-1-9" of disk "BACKUP" to folder "~/Test".
这似乎是一个微不足道的问题,但我不知道如何解决它。谁能让我知道我做错了什么?