【发布时间】:2017-04-27 12:21:39
【问题描述】:
我正在尝试编写一个 AppleScript,它接收一组文件(重要的是要注意,它们并不都在同一个文件夹中),将每个文件重命名为它所在文件夹的名称。到目前为止,我有什么在下面,但我收到一个错误,上面写着“无法获得 1 的容器”。数字 -1728 来自 的 1。
tell application "Finder"
set all_files to every item of (choose file with prompt "Choose the Files you'd like to rename:" with multiple selections allowed) as list
repeat with a from 1 to length of all_files
set folder_name to container of a
set file_name to folder_name
end repeat
end tell
【问题讨论】:
标签: applescript