I have an external hard drive, with which there is a .sparsebundle that I use for TimeMachine backups. I want to automatically mount this .sparsebundle after the external Drive mounts. I've tried making an AppleScript app to launch on startup, however, it doesn't work. Here is what I have so far.
tell application "Finder" try (mount volume) / Volumes / External on error return end try if exists disk "External" then do shell script "hdiutil attach /Volumes/External/TimeMachine/TimeMachineTest.sparsebundle" else display dialog "Unable to mount TimeMachine" end if end tell
I made an AppleScript application that mounts the .sparsebundle, but only when its launched. I want this to run whenever the external drive is mounted.
set mountedVolumes to do shell script "ls /Volumes/" if (mountedVolumes contains "External") is true then do shell script "hdiutil attach /Volumes/External/TimeMachine/TimeMachineTest.sparsebundle" end if