【发布时间】:2014-11-23 14:12:41
【问题描述】:
我想更改文件夹中的文件名,该文件名并不总是相同,这取决于 applescript 的存储位置(与要更改的文件相同的文件夹)。
我用一个对话框制作了这个脚本来检查路径,它工作正常,但之后我得到一个错误(-1700,无法将“测试”更改为整数。为什么,以及如何解决这个问题?
tell application "Finder"
set thePath to POSIX path of ((path to me as string) & "::")
display dialog thePath buttons {"Clipboard", "OK"} default button 2
if the button returned of the result is "Clipboard" then
set the clipboard to thePath
end if
set name of document file "test" of thePath to "test_OLD"
end tell
【问题讨论】:
标签: applescript