2016-09-26 14 views
0

パスの内容をあるディレクトリから別のディレクトリに移動しようとしていますが、エラーが発生し続けています。どんな助けでも大歓迎です。移動内容:パス全体の内容を取得できません

tell application "Finder" 
    set srcPath to POSIX path of ((parent of (path to me) as text) & "M Templates") 
    set dstPath to POSIX path of (((path to movies folder) as text) & "M Templates") 


    duplicate entire contents of srcPath to dstPath 
end tell 

答えて

1

~/Movies/M Templatesが既に存在すると仮定すると、あなたはそれに追加のファイルをコピーするだけではなく、それを完全に置き換えたい:(あなたがFinderは自動的に既存のアイテムを上書きする場合duplicate...with replacingを使用してください。)

set src to path to me 
set dst to path to movies folder 

tell application "Finder" 
    duplicate items of folder "M Templates" of parent of src ¬ 
     to folder "M Templates" of dst with replacing 
end tell 

または、交換、オーバーM Templatesフォルダをコピーするには、以前の1:

set src to path to me 
set dst to path to movies folder 

tell application "Finder" 
    duplicate folder "M Templates" of parent of src to dst with replacing 
end tell 
関連する問題