Benches macOS

7

Automator to do something when USB is plu…

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

How can I capture an automator event when a USB hard drive is plugged in?

I want to capture this event so that I can do an RSYNC of it's data to my local drive.

7 replies

Sign in or join Beachball Help to reply.

  1. 0

    red_menace

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    When a disk is mounted, an alias to it is created in the (normally invisible) /Volumes folder in your startup disk's root directory. A folder action script or Automator plugin for folder actions can be attached to the folder to trigger your workflow.

  2. 0

    axwack

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Thanks for responding. The problem is that the volumes directory is hidden. How can I get reference to it?

  3. 0

    Barney-15E

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Finder, Go menu, Go to Folder…

    Type in /Volumes and hit return

    You can get the same dialog in an Open/Save dialog by typing cmd+shift-G.

  4. 0

    axwack

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Hi...no I'm familiar with that but in Automator and the finder, the volumes directory is hidden. I must be doing something wrong because I'm super user.

  5. 0

    Barney-15E

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Automator, File menu, Save As Plugin…>>Attached to folder: Other…>>cmd+shift-g, type /Volumes, Go, Open.

  6. 0

    red_menace

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Being a super user doesn't have much to do with it - hidden files are just a feature of whatever application you are using to view the items. The Finder and Automator normally won't deal with hidden items (unless the preference is set to show them), but to do something like attach/configure folder actions, the methods described by Barney-15E are all you need. There also isn't really a need to directly specify the source folder for an Automator workflow, since the items added to the folder will be passed to your workflow by the folder action.

  7. 0

    Nascavo

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Obrigado!