# Auto-start Transfers

This AppleScript uses OffShoot's [Disk Added](https://docs.hedge.video/offshoot/features/automation/scripts/events/disk-added) event to automatically start a transfer through the OffShoot API.

### How to use

1. Open the script and edit the settings.
2. Add the script to the [Disk Added](https://docs.hedge.video/offshoot/features/automation/scripts/events/disk-added) event in OffShoot's `Settings > Scripting` pane.
3. When a disk is added to OffShoot, the script will check the Volume name.
   * If the volume name **contains** `theExpectedVolumeName` the disk is set as Source and transferred to `theDestinationPath`.
   * If the volume name **begins** with the first character of `theExpectedVolumeParts` AND if the volume name **contains** the last character of `theExpectedVolumeParts` the disk is set as Source and transferred to `theDestinationPath`.

{% hint style="info" %}
This script works best when you disable OffShoot's Auto Source and Remember Destination settings in OffShoot > Settings > General.
{% endhint %}

### Settings

```
set theExpectedVolumeName to {"UNTITLED", "CANON"}
set theExpectedVolumeParts to {"A_", "B_"} -- will check if volume name STARTSWITH 'A' and CONTAINS '_'
set theDestinationPath to ""
set theLabel to ""
set theFolderFormat to "${DISKTITLE}"
```

### Download

{% file src="<https://1060439511-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LStRji2w1AYja1bLBFv%2F-Me0fjL0poZsYkVCc3im%2F-Me46iPh5H1x3dHXLMBc%2FAutomated_Hedge_Transfer.scpt.zip?alt=media&token=f58bee7d-d7c9-47ce-b3ac-2db1f99db746>" %}
Automated Hedge Transfer Script
{% endfile %}
