Create a Finder Quick Action that receives files, repeats through the selection, and opens each item in your chosen app. This guide uses disposable text files and TextEdit, with checks for missing input, duplicate filenames, and incorrect variable connections.

Prepare files that your chosen app can open

The concrete task is to select several existing local files in Finder and send each to the same app. Start with two synthetic plain-text documents: Blue note.txt, containing Blue sample, and Green note.txt, containing Green sample. Save them in a new Desktop folder named Finder Opening Test. If that folder already exists, choose another name and adjust the later example accordingly.

Before building the shortcut, open each sample manually: Control-click it in Finder, choose Open With, and select TextEdit. This establishes that the intended app can handle the input. Apple documents this method for opening a file with a particular app, along with dragging a file onto an app icon. Choose an app to open a file on Mac.

For another workflow, substitute an installed app and disposable files in a format it supports. Selecting an app does not establish that it can read every selected format. Keep the initial test to ordinary local documents; folders and document packages introduce different handling requirements.

Build the Finder Quick Action

Configure file input and an empty-selection response

Create a shortcut in Shortcuts and name it Open Selected Text in TextEdit. Apple’s creation guide explains adding actions from the action library and configuring their parameters. Create a custom shortcut on Mac.

Open the shortcut’s Details, enable Use as Quick Action, and select Finder as an available location. Apple documents Finder integration and notes that selecting Finder may require adding files or folders to the shortcut’s allowed input. Run a shortcut while working on your Mac.

At the top of the workflow, click the accepted input types. Clear the broad selection and enable Files. Apple defines this type as encompassing documents, images, PDFs, and other files; folders have a separate input type. This workflow intentionally accepts files. Understanding input types in Shortcuts on Mac.

Set the no-input behavior to Stop and Respond, with the message Select sample files in Finder, then run this Quick Action. This makes an empty run understandable. Apple documents that some launch locations, including the Dock, supply no initial input, and provides this response option. Limit the input for a shortcut when run from another app on Mac.

Connect each selected file to the opening action

Add Repeat with Each and set its list to Shortcut Input. Inside the loop, add Open File. Set its file parameter to Repeat Item, then choose TextEdit in its app parameter instead of leaving Default App selected. The following is a workflow diagram, not executable code:

Receive Files from Finder
If there is no input: Stop and Respond

Repeat with each item in Shortcut Input
    Open Repeat Item in TextEdit
End Repeat

The critical connection is Repeat Item. Apple documents that Repeat with Each accepts a list and runs the enclosed actions once per item; Repeat Item contains the current item during each iteration. Passing the whole Shortcut Input list into the opening action inside the loop would defeat that one-file-per-iteration design. Use Repeat actions in Shortcuts on Mac.

Check the opening action’s information on your Mac before running it: Control-click its icon and choose Show Info. Apple documents this as the way to inspect an action’s description, accepted input, and resulting output. Confirm you selected the file-opening action and that its configuration offers the chosen app. Navigate the action list in Shortcuts on Mac.

Preserve these boundaries when editing the workflow:

Stage Value used here What to preserve
Finder input Selected file items Keep the files as file items.
Repeat with Each input The Shortcut Input list Process the supplied list.
Repeat Item One selected file Connect this variable to Open File.
After opening No downstream action in this workflow Do not assume the result contains edited document contents.

Apple explains that a repeat loop gathers the enclosed actions’ outputs into its overall result. Consequently, the loop’s result depends on those actions’ output contracts. This shortcut needs only the opening operation and ends at End Repeat; it does not use that result as a new file list. Repeat action data flow.

Run a small test before using a larger selection

In Finder, open Finder Opening Test, select both sample documents, then Control-click one of the selected items. Choose Quick Actions, followed by Open Selected Text in TextEdit. Apple documents running shortcuts from this contextual menu and from the Finder preview pane. If the shortcut is absent, check its Finder availability and whether its Finder extension is enabled. Run a shortcut from the Quick Actions menu.

Verify the contents, not just whether TextEdit appeared. You should be able to locate both Blue sample and Green sample. The workflow requests one opening operation per selected file; it does not configure window placement, tab grouping, or document order.

Use this small test matrix to distinguish selection problems from app problems. These are proposed checks, not reported test results:

Test What to check
Select only Blue note.txt The blue sample opens.
Select both sample documents Both distinct contents are available.
Launch without supplied input The configured selection message appears.
Select two same-named files from different folders Both distinct contents remain identifiable.

For the final check, create two subfolders inside your disposable test folder. Save a plain-text document named Sample.txt in each, with First folder sample and Second folder sample as their respective contents. Select those two files together in a Finder search limited to the test folder, then run the Quick Action.

This is a useful diagnostic because the proposed workflow passes selected file items directly. It contains no step that extracts a basename and reconstructs a path. Keep those direct connections when adapting it: a filename alone cannot distinguish these two documents.

Understand file-existence and name-collision limits

The files must already exist when the opening operation uses them. This shortcut contains no creation or recovery step. If a sample has been moved or removed, select it again from its current location before retrying. Avoid adding a fixed path simply to compensate for a stale selection.

The workflow also contains no copy, rename, move, or save action. It therefore creates no destination naming policy. Two existing files named Sample.txt in different folders do not require a new output name for this workflow. If you later add a save or export step, separately decide its destination and how it handles an existing filename.

Opening a document also does not establish that a later editing or export operation succeeded. Keep the first version limited to opening the disposable samples, then evaluate any additional operation according to its own input, output, and existing-file behavior.

Use Terminal to isolate input problems

If Finder invocation is unclear, test the same shortcut with explicit file inputs. Apple documents shortcuts run and the -i option for supplying file paths. It specifically distinguishes this from piping path text, which supplies text rather than file-path input. Run shortcuts from the command line.

After creating the shortcut and the two Desktop samples described above, run this complete shell example in Terminal. It checks both paths before invoking Shortcuts and quotes each path to preserve spaces. Its shell syntax was checked; the macOS command and graphical workflow were not executed in this research environment.

/bin/bash <<'SCRIPT'
set -eu

sample_dir="$HOME/Desktop/Finder Opening Test"
first="$sample_dir/Blue note.txt"
second="$sample_dir/Green note.txt"

for file in "$first" "$second"; do
  if [ ! -f "$file" ]; then
    printf 'Missing sample file: %s\n' "$file" >&2
    exit 1
  fi
done

/usr/bin/shortcuts run "Open Selected Text in TextEdit" \
  -i "$first" "$second"
SCRIPT

This example uses only the two explicit sample paths. It does not discover the current Finder selection. Apple documents an exit status of 0 for a successful shortcut run and 1 for an error; still inspect the sample documents to confirm the intended visible result. Shortcuts command behavior.

Diagnose the first point where the result differs

If the shortcut appears but receives nothing, check the accepted Files type and invoke it again with the sample files selected in Finder. If only one document opens, inspect the loop’s list connection and the opening action’s Repeat Item connection.

To inspect what enters the workflow, temporarily place Quick Look before the repeat loop and explicitly connect it to Shortcut Input. Keep the repeat loop explicitly connected to Shortcut Input as well. Apple recommends inserting Quick Look between actions to inspect the content being passed. Remove the diagnostic action after checking the samples. Testing your actions in Shortcuts on Mac.

If another app opens, recheck the app parameter in Open File. If TextEdit cannot open a sample manually, resolve that document problem first. Apple notes that an app may fail to open a file because it does not recognize the format. Choose an app to open a file on Mac.

Once both disposable samples open through Finder, the shortcut is ready for the same task with compatible local files: select the documents, run the Quick Action, and inspect them in the chosen app. Preserve the file items and the one-item loop connection as you adapt it.

Sources