> For the complete documentation index, see [llms.txt](https://docs.hedge.video/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hedge.video/offshoot/features/automation/scripts/events/filecopycompleted.md).

# File Copy Completed

Fires when a single transfer completes.

**Example**

```
21/05/2026, 15:50:24 - File Copy Completed: {
  "FileCopyCompleted_sourcePaths" = "(
    "/Volumes/HDD"
)";
  "FileCopyCompleted_presetName" = "Project A";
  "FileCopyCompleted_state" = "Success";
  "FileCopyCompleted_sourceInfo" = "{
    Date = "2026-05-21";
    "Shoot Day" = 01;
    "Source Name" = A001;
}";
  "FileCopyCompleted_startedAt" = 20260521155024;
  "FileCopyCompleted_destinationPath" = "/Volumes/RAID 01/Project A/Media/20260521/A001-01";
  "FileCopyCompleted_verification_mode" = "Transfer";
  "FileCopyCompleted_duration" = 0.094281;
  "FileCopyCompleted_bytesCopied" = 4804723;
  "FileCopyCompleted_id" = "371A0223-BAA9-4093-B343-F712568B8D11";
  "FileCopyCompleted_transferLogJSONPath" = "/Users/jeroendejong/Library/Application Support/OffShoot/Transfer Logs/2026-05-21/OffShoot Log - 2026-05-21 at 15.50.24 - A001 - RAID 01.json";
}

```

{% hint style="info" %}
This event fires for **all** transfer end states (`Success`, `Failed`, `Warnings`, `Canceled`, and `Stopped`). Make sure to check the `FileCopyCompleted_state` variable in your script. <br>

**Example**

```
set FileCopyCompleted_state to "{FileCopyCompleted_state}"
if FileCopyCompleted_state is not "Success" then return false
```

{% endhint %}

Copying a source to two destinations will fire two separate File Copy Completed events, plus three Disk Idle events.

All set values are returned as Strings. In case of `FileCopyCompleted_sourceInfo` a `JSON` object is returned as a String. 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
```

&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.hedge.video/offshoot/features/automation/scripts/events/filecopycompleted.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
