Jump to content

How to pass multiple files to an app?


Recommended Posts

Posted

Dear forum:

 

I'm struggling with a seemingly simple task. I have created a workflow for securely deleting files in such that pressing ⌘ + ⌥ + ⌫ should pass files selected in the Finder to the app that then securely deletes the files. Refer to the enclosed screenshots.

 

The problem I'm facing is that the workflow only works for one file at a time and not multiple files that I've selected. In other words, I have to select each individual file that I want to delete with this workflow and press the key combination for each.

 

How can I achieve it that all files that are selected in the Finder are passed to the app for deletion in one go? Any idea what I'm doing wrong?

 

Thanks! 

WF1.png

WF2.png

WF3.png

Posted

@fabeck01 Welcome to the forum :)

 

When using a hotkey with Selection in macOS > Open File without specifying the app to open with, multiple files can be opened just fine (e.g. if I select a few PDFs and let them open by default in Preview).

 

This leads me to wonder if your Secure File Deletion app, which I'm not familiar with, allows multiple files to be sent at once. If you select a few files on your Desktop, right-click and choose "Open with..." in the macOS menu, then choose the file deletion app, are they all processed at once?

Posted
On 1/12/2024 at 10:36 AM, Vero said:

This leads me to wonder if your Secure File Deletion app, which I'm not familiar with, allows multiple files to be sent at once. If you select a few files on your Desktop, right-click and choose "Open with..." in the macOS menu, then choose the file deletion app, are they all processed at once?

Thank you, Vero, for your reply. I tested it and can confirm that the app allows multiple files to be passed to it via "Open with...". 

Posted
19 hours ago, vitor said:

Try replacing the Open File with a Run Script Action. Leave everything at the default but make the Script:

 

open -a 'Secure File Deletion' "${@}"

 

Does that work for you? If not, what does the debugger say?

Thank you, vitor, for the help, which solved it! The script works great. 🙂

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