Jump to content
turnstyle

Sending multiple files selected in Finder to an app, sequential vs. all-at-once

Recommended Posts

Hi all,

 

I'm trying to open multiple selected files from Finder into a specific app -- in my case photo library utility Lightroom, which then opens them into an Import dialog.

 

My problem: only one of the selected files shows up in Lightroom's Import dialog.

 

If I select the same multiple files in Finder ... then command-click to get to "Open With" ... then select "Other" ... then select Lightroom ... now I get all of them. Meaning, Lightroom can be sent multiple files, but not the way Alfred is sending them.

 

I believe Alfred may be sending them "one-by-one" -- in which case, I think Lightroom opens its dialog when it gets the first file, and then (because the dialog is already open) it refuses to open the rest.

 

Is there perhaps some way to get around this?

 

Thanks, maybe just not possible...

Share this post


Link to post
10 minutes ago, turnstyle said:

I believe Alfred may be sending them "one-by-one"

 

It does (unless something has changed). I previously reported the same issue with another application, but as I remember, sending all the files at once cause problems with other applications, and Andrew deemed breaking working apps a worse choice than fixing ones that didn't work.

 

I don't remember the exact details, though, and it was a good few years ago, so the circumstances may have changed, and @Andrew might consider revisiting the issue?

Edited by deanishe

Share this post


Link to post

Another way it could be fixed, at least for me...

 

The selection of apps in Finder's "Open With" menu doesn't seem particularly simple to edit, in my case I would just add Lightroom to show up for JPGs and other image files.

 

Alfred has its own File Actions -- which includes an option to "Open With" -- and which is populated with the same app options as I see in Finder.

 

But since this is now within Alfred, perhaps some new feature could permit adding our own choices to how Alfred shows its own "Open With."

 

Thanks for responding.

Share this post


Link to post

This simplest solution (imo), which is what I did for the app that I had problems with, is to implement your own File Action that calls the app with all files at once.

 

It's basically just a File Action connected to a Run Script with Language = /bin/zsh and the script open -a YourApplication $@, and has the bonus that you can call the action directly without first going through Alfred's Open With… menu.

 

 

 

Share this post


Link to post

I'm afraid I'm not very technical when it comes Mac/Unix (or other MacOS scripting) so I don't yet how I would go about putting something as your suggestion into play.

 

You mean, for example, something would be added to the Command-click menu in Finder? And then run against selected files?

 

Sorry I not up to speed, certainly feel free to ignore me -- your help much appreciated regardless.

Share this post


Link to post
11 hours ago, deanishe said:

I don't remember the exact details, though, and it was a good few years ago, so the circumstances may have changed, and @Andrew might consider revisiting the issue?

 

This was quite some time back now, but quite a few apps were simply ignoring more than the first one when sending as a single batch.

 

I've added note to have a fresh look at this :) 

Share this post


Link to post
16 hours ago, turnstyle said:

You mean, for example, something would be added to the Command-click menu in Finder?

 

No, I mean creating a workflow in Alfred and adding a File Action to it, which would show up in Alfred's list of file actions (alongside Open With…), but not in Finder or any other app.

Share this post


Link to post

Ah! So, grateful for these last tips...

 

1) Instead of sending the "Selection in MacOS" to "Actions/Open File" I would instead send it to "Actions/Run Script"

 

2) The Script would be set to language "/bin/zsh"

 

3) Question: I leave "with input as argv" (or change to "with input as {querry}")?

 

4) Question: I leave running instances as "Sequentially" (or change to "Concurrently")?

 

5) The dialog defaults to open with:

query=$1

echo -n $query

Am I supposed to keep that? Or just replace all of it?

 

6) open -a YourApplication $@

 

If my application is named Adobe Lightroom Classic, am I supposed to put that in some sort of quotes?

 

This will be so amazing to finally get working!

Share this post


Link to post
59 minutes ago, turnstyle said:

Instead of sending the "Selection in MacOS" to "Actions/Open File" I would instead send it to "Actions/Run Script"

 

Yes.

 

1 hour ago, turnstyle said:

If my application is named Adobe Lightroom Classic, am I supposed to put that in some sort of quotes?

 

Also yes.

Share this post


Link to post

Does this seem right to you? As is, nothing happens. If I change "input as argv" to "input as {query}" then the application opens, but not with the files I have selected.

 

Thanks a ton, and certainly feel no obligation to help.

Screen Shot 2019-12-03 at 5.30.57 PM.png

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.

×
×
  • Create New...