0

First off, let´s set the scene. I am trying to make a small applet (.app) to include in a DMG-file for distribution. The .app file will only activate when a user drags a folder with my product-files onto it. Then the folder is supposed to be copied into the current user´s /Music/MY CUSTOM PATH/. Any user on any system, that happens to be logged in.

This is similar to having a relative symlink/alias to the /Applications folder, like when you install google chrome or any app that comes in a dmg.

So, by using the Automator action "copy finder items" I dragged the pre-defined variable "variables > Locations > Music" to the action and that works well on any system, by copying any file you drag onto my .app into the users ~/Music folder.

Great. But my app goes into the folder ~/Music/Audio Music Apps/Patches/my-folder. Now what?

I have tried to find anything related to "combine folder paths" or "combine variables" or "append..." but with no luck. I´m to Automator so don´t know all the tricks. Please help me make it possible to create an app that can copy into ANY sub-folder of ANY user´s home folder, on any system.

  • Automator doesn't have any default actions to manipulate variables or build file paths, so you will need to use a third party action or roll your own by using a script in a Run AppleScript action. – red_menace Jan 19 at 4:01
  • @red_menace True, I realized that after much tinkering. But the answer I gave the question is the same result as combining variables, not really, but in my own case. I tried some applescript and bash/shell alternatives but the answer was to simple. God. Forgot about Apple´s drag-n-dropiness. Thanks. – andiOak Jan 19 at 19:36
1

Finally, there is no "combine variables" action per say in automator, but you can add a custom text variable, and drag another variable from the library variables into any part of the text in the value field. In my case, needing to combine paths to folders, this is the same thing.

  1. create a "text" variable from Variables > Text & Data > Text.
  2. Drag the desired variable into the "Value" field anywhere you need it.

Done. You can now add the text-variable you just made to the "copy Finder items" action as the destination. This enables you to use it on ANY system, ANY user. Very handy for an installation file, or any dock-app with custom paths (but still relative paths to whatever user is logged in).

enter image description here

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .