How do I get Automator to move a folder to Appname.app/Contents/etc

I'm trying to create an Automator Quick Action to move a selected folder into the Resources folder of an app, accessed by clicking Show package contents in the Applications folder.

There doesn't seem to be a way to move the folder there. I've tried Move Finder Items, but it doesn't allow me to select an app's package contents.

The closest I've gotten is to just drag the folder into Automator, and then store it in a variable, but for some reason, storing a value in one variable stores it in the other as well, which is really weird and prevents me from using this method.

Is there a way to do this, and if so, how would it be done?


Solution 1:

Here is some AppleScript that should help.

To select the move folder you would use

set moveFolder to POSIX path of (choose folder with prompt "Choose the folder you would like to move")

and for setting the destination folder you would write

set aFolder to POSIX path of (choose folder with prompt "Choose the Application you would like to copy items to")
set destFolder to (aFolder & "Contents/Resources/") as string

And to move the folder you would use:

do shell script (("mv " & moveFolder & space & destFolder)as string)

Hope that helps.