Jump to content
Sign in to follow this  
JoeKueser

Need Help: Copy selected .app to /Applications folder

Recommended Posts

This should be the simplest workflow ever devised.

 

I wanted to simply be able to select a file in my downloads folder or a DMG, wake Alfred up and type "install" and the workflow would simply copy the selected .app file to your /Applications folder.

 

I've tried a few different ways, but I think the right way is a file filter followed by a script.

 

So I have a file filter set up to take only application files, and I have a script that executes: "cp -R {query} /Applications/"

 

I thought it could be a permissions thing, so I'd need "sudo cp -R {query} /Applications/", but wasn't sure if Alfred could handle sudo, so I switched to doing "cp -R {query} ~/Applications/" but still nothing.

 

Incidentally, if I run "cp -R SomeCool.app /Applications/" in the terminal, it works like a champ, no sudo needed.

 

If anyone could shed some light on where my thinking is flawed (in relation to this workflow, not in general) it would be greatly appreciated.

 

Thanks!

Share this post


Link to post

This should be the simplest workflow ever devised.

 

I wanted to simply be able to select a file in my downloads folder or a DMG, wake Alfred up and type "install" and the workflow would simply copy the selected .app file to your /Applications folder.

 

I've tried a few different ways, but I think the right way is a file filter followed by a script.

 

So I have a file filter set up to take only application files, and I have a script that executes: "cp -R {query} /Applications/"

 

I thought it could be a permissions thing, so I'd need "sudo cp -R {query} /Applications/", but wasn't sure if Alfred could handle sudo, so I switched to doing "cp -R {query} ~/Applications/" but still nothing.

 

Incidentally, if I run "cp -R SomeCool.app /Applications/" in the terminal, it works like a champ, no sudo needed.

 

If anyone could shed some light on where my thinking is flawed (in relation to this workflow, not in general) it would be greatly appreciated.

 

Thanks!

 

Could the path in {query} have had spaces or anything else in it that would have messed it up? Have you tried wrapping {query} in quotes?

Share this post


Link to post

Quotes didn't help.

 

I'm currently leaning toward me just starting with the right place.

 

I see other workflows that are doing something to the file selected in Finder, and they aren't starting with a file filter. All of them seem to be using custom scripts. I might have to go that route.

Share this post


Link to post

I managed to get it working with a Hotkey with no issues. That works fine.

 

Thanks for your help!

 

Simple workflow, but now I can install an app without using my mouse  :)

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  
×
×
  • Create New...