0
我正在尝试编写一个AppleScript,它将文件选择(需要注意的是,它们并不全部位于同一个文件夹中),将每个文件重命名为它所在文件夹的名称。远远我有下面的内容,但我得到一个错误,其中显示“无法获取1的容器”。从< 1.AppleScript变量作为文件夹
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