这些方面的东西?
tell application "Finder"
duplicate file "somefile.txt" of folder of (file (path to me)) to folder applications of folder startup disk
end tell
答案 0 :(得分:1)
你非常接近,但这是正确的剧本。
tell application "Finder" to duplicate "somefile.txt" of (container of (path to me)) to applications folder
tell application "Finder"
set prevTIDs to Applescript's text item delimiters
set Applescript's text item delimiters to ":"
duplicate "somefile.txt" of (text items 1 thru -2 of (path to me as string)) as alias to applications folder
set Applescript's text item delimiters to prevTIDs
end tell