0
我試圖將文件和目錄從一個名爲「Motion Templates」的目錄複製到另一個名爲「Motion Templates」的目錄中。在AppleScript中,如何將目錄的內容複製到另一個目錄而不刪除目標目錄的現有文件?
tell application "Finder"
set srcPath to ((parent of (path to me) as text) & "Motion Templates")
set dstPath to (((path to movies folder) as text) & "Motion Templates")
set srcFolder to folder srcPath
set dstFolder to folder dstPath
duplicate entire contents of srcFolder to dstFolder with replacing
end tell
源目錄(運動模板)包含的子目錄(發電機),它在「運動模板/發電機」匹配的文件路徑(從源到目的地的方面比到目的地「運動模板」成功拷貝「運動模板/發生器」)。但是,此腳本還會刪除「Motion Templates/Generators」中存在的所有現有子目錄。如何在不刪除樹中其他現有文件的情況下複製/覆蓋文件?