0
沿着這些線?如何從AppleScript代碼複製(複製)和移動文件夾?
tell application "Finder"
duplicate file "somefile.txt" of folder of (file (path to me)) to folder applications of folder startup disk
end tell
沿着這些線?如何從AppleScript代碼複製(複製)和移動文件夾?
tell application "Finder"
duplicate file "somefile.txt" of folder of (file (path to me)) to folder applications of folder startup disk
end tell
你非常接近,但這裏是正確的腳本。
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
謝謝 - 當我運行該腳本就回來了:無法獲得(的(路徑容器我))的 「somefile.txt」。不允許訪問。 – Jayer
@Jayer它應該工作。我更新了該帖子,向您展示了另一種方式。 – fireshadow52