Jump to content

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...

Link to comment
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
Link to comment

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.

Link to comment

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.

 

 

 

Link to comment

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.

Link to comment
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 :) 

Link to comment
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.

Link to comment

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!

Link to comment
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.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...