我正在尝试设置脚本以将模板文件复制到新创建的文件夹中。该文件是从 template_name 创建的变量。不幸的是,我是 posix 新手,似乎无法让脚本将模板文件复制到新文件夹。
返回的错误是“无法将应用程序“Finder”的“/Volumes/Media/NewFolder”设置为应用程序“Finder”的文件“Volumes/Media/+A3Temp.ptx”
set temp_name to client_code & " " & brand_name & " " & job_name & " " & job_number & " " & creation_date
set media_folder to "/Volumes/Media/"
set new_folder to media_folder & temp_name
set template_name to ("+" & suite & "Temp.ptx") as string
set session_name to (client_code & " " & brand_name & " " & job_name & " " & creation_date & ".ptx")
set template to (media_folder & template_name)
tell application "Finder"
duplicate POSIX file template to POSIX file new_folder
end tell
我知道错误在于这些行
tell application "Finder"
duplicate POSIX file template to POSIX file new_folder
end tell
但我不知道如何补救。有人可以帮忙吗!?