2016-09-26 5 views
0

ich einfach versuche, den Inhalt meines Weg von einem Verzeichnis in ein anderes zu bewegen, aber ich immer einen Fehler bekommen, und ich bin nicht sicher, was ich falsch mache. Jede Hilfe würde sehr geschätzt werden.Verschieben des Inhalts: Kann nicht gesamte Inhalt der Weg bekommen

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 

Antwort

1

Unter der Annahme, ~/Movies/M Templates bereits vorhanden ist, und Sie wollen vielmehr zusätzliche Dateien in sie kopieren, als nur ganz ersetzen:

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 

(Verwenden duplicate...with replacing wenn Sie Finder möchten automatisch alle vorhandenen Elemente zu überschreiben.)

Oder die M Templates Ordner über zu kopieren, ersetzt jede vorherige:

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 
Verwandte Themen