Carbon Copy Cloner .cccerrors export

Kommt es beim Klonen einer HD mit dem Carbon Copy Cloner zu Fehlern, kann man die Liste der nicht kopierten Dateien als .cccerrors-Datei sichern. Dummerweise handelt es sich dabei um eine binär kodierte plist und das einfach Kopieren aller Dateipfade bei denen es Probleme gab, ist schlicht kein Feature der Software (so scheint es mir).
Nun, dieses Quick&Dirty-Droplet konvertiert die plist und kopiert alle DateiPfade daraus in die Zwischenablage.

on open these
  repeat with this in these
    set XMLfile to POSIX path of (this)
    if XMLfile ends with ".cccerrors" then
      set theoutput to do shell script "plutil -convert xml1 " & quoted form of XMLfile & ";cat " & quoted form of XMLfile & "| awk '/affectedItem/{getline; print}'"
      set theoutput to replace_chars(theoutput, "  ", "")
      set theoutput to replace_chars(theoutput, "<string>", "")
      set theoutput to replace_chars(theoutput, "</string>", "")
      set a to every paragraph of theoutput
      set theoutput to {}
      repeat with b in a
        if theoutput does not contain b then
          set theoutput to theoutput & b
        end if
      end repeat
      set AppleScript's text item delimiters to "
"
      set theoutput to theoutput as text
      set AppleScript's text item delimiters to ""
      set the clipboard to theoutput
      display dialog (count of every paragraph of theoutput) & " lines in the clipboard" as text
      exit repeat
    end if
  end repeat
end open
on replace_chars(this_text, search_string, replacement_string)
  if this_text contains the search_string then
    set od to AppleScript's text item delimiters
    set AppleScript's text item delimiters to the search_string
    set the item_list to every text item of this_text
    set AppleScript's text item delimiters to the replacement_string
    set this_text to the item_list as string
    set AppleScript's text item delimiters to od
  end if
  return this_text
end replace_chars

									


[Download not found]

One thought on “Carbon Copy Cloner .cccerrors export

  1. Roger says:

    Thank you for that droplet.
    Exactly what I was looking for, to see on windows computer which were corrupted files.

Leave a Reply