File Copy Completed

Fires when a single transfer completes. Copying a source to two destinations will fire two separate File Copy Completed events, plus three Disk Idle events.

Example

02/01/2022, 11:42 - File copy completed: {
    "FileCopyCompleted_bytesCopied" = 823549835;
    "FileCopyCompleted_destinationPath" = "/Users/Hedge/Project X/CAM A/001";
    "FileCopyCompleted_duration" = "6.256199";
    "FileCopyCompleted_mode" = "Backup";
    "FileCopyCompleted_presetName" = "Project X";
     "FileCopyCompleted_sourceInfo" =     {
        "Source Name" = "Untitled";
        "Location = "London"
        "Counter" = "003"
    };
    "FileCopyCompleted_sourcePaths" = "/Volumes/UNTITLED";
    "FileCopyCompleted_startedAt" = 20190102114226;
    "FileCopyCompleted_state" = Success;
}

All set values are returned as Strings. In case of FileCopyCompleted_sourceInfo a String of a JSON object is returned. To use it in AppleScript you can use the following code:

set FileCopyCompleted_sourceInfo to "{FileCopyCompleted_sourceInfo}"
set FileCopyCompleted_sourceInfoRecord to run script (do shell script ("echo " & FileCopyCompleted_sourceInfo's quoted form & " | sed -E 's/\"([^\"]+)\"[[:space:]]*:[[:space:]]*/|\\1|:/g' | tr -d '\\n\\r'"))

display alert |Location| of FileCopyCompleted_sourceInfoRecord
display alert |Counter| of FileCopyCompleted_sourceInfoRecord
display alert |Source Name| of FileCopyCompleted_sourceInfoRecord

Last updated