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