bitteschön…

README (wichtig)
in die beiden properties in Admin Credentials müssen anstelle von user und pass die Admin-Userdaten eingeben, dann funktioniert auch das Kopieren aus der lokalen Library.

Der Rechner muss vom Ziel-System (neues System) gebootet sein!
Das script muss als Programm abgespeichert werde. Ort ist allerdings egal.
Ziehe das das SciptProgramm-Icon in ein offenes Finder-Fenster direkt links vom Suchfeld.
Beim ersten Start wird das Quell-Laufwerk (altes System) abgefragt. Die Einstellung ist permanent.
Wenn du die Einstellung ändern willst muss du das script neu kompilieren und abspeichern.

Alles, was kopiert wird, überschreibt eventuell vorhandene Dateien auf dem neuen System.
Es gibt keine Abfrage!


Show Plain Text
  1. (************ Admin Credentials ****************)
  2.  
  3. property _username : "user"
  4. property _password : "pass"
  5.  
  6. (****************************************)
  7.  
  8. property sourceVolume : missing value
  9.  
  10. on reopen
  11.   getSource()
  12. end reopen
  13.  
  14. on run
  15.   if sourceVolume is missing value then getSource()
  16.   activate application "SystemUIServer"
  17.   tell application "Finder"
  18.     activate
  19.     set sel to selection
  20.   end tell
  21.   repeat with i in sel
  22.     set source to POSIX path of (i as alias)
  23.     if source begins with sourceVolume then
  24.       set destination to text ((count sourceVolume) + 1) thru -1 of source
  25.       do shell script "cp -pR " & quoted form of source & space & quoted form of destination user name _username password _password with administrator privileges
  26.     end if
  27.   end repeat
  28. end run
  29.  
  30. on getSource()
  31.   tell application "System Events"
  32.     set startupDisk to name of startup disk
  33.     set volumeNames to name of disks whose name is not startupDisk and format is not NFS format
  34.   end tell
  35.   set sourceDisk to choose from list volumeNames with prompt "Quell-Volume auswählen"
  36.   if sourceDisk is false then return
  37.   set sourceVolume to "/Volumes/" & item 1 of sourceDisk
  38. end getSource
----------
Gruss

Stefan