To filter files you select in Finder, make a Mac shortcut that receives those files as input, then passes the Shortcut Input variable to Filter Files. Add a condition such as a name or file attribute, and the shortcut returns only the matching items. This approach filters the selection you provide; it does not search your whole Mac or change the original files.
Set up the shortcut to receive Finder files
Open Shortcuts, create a new shortcut, and give it a descriptive name, such as “Filter Selected Files.” Open the shortcut’s Details, choose Use as Quick Action, and make sure the shortcut accepts files. When you enable a shortcut for use in other apps, Shortcuts adds an input action at the start of the workflow to define what it can receive. Apple documents Finder Quick Actions as a way to run a shortcut on a selected Finder item. Run a shortcut while working on your Mac
Now add Filter Files from the action search and place it after the input action. A Filter action works on content supplied by a previous action; it narrows that input and passes the matches onward. In this workflow, the input is the file selection sent from Finder. Intro to Find and Filter actions in Shortcuts on Mac
Pass Shortcut Input into Filter Files
In many workflows, actions connect automatically: the line between two actions indicates that the earlier action’s output is passed to the next action as input. Check that the input to Filter Files comes from the shortcut’s received files. If you need to set the input explicitly, use the action’s input control to insert the Shortcut Input variable. In Shortcuts, variables appear as blue tokens; Control-clicking a parameter or text field opens the variable options where supported. Use variables in Shortcuts on Mac
Click Add Filter in Filter Files, then click the terms in the condition to choose the field, comparison, and value. For example, set a name condition to find selected items whose names contain a particular word. The exact fields available depend on the action’s filter options in your macOS version and the kind of input; choose a field offered in the action rather than typing a made-up Finder command. To combine criteria, add another filter. Shortcuts offers All or Any when multiple criteria are present: All requires every condition to match, while Any allows a match to satisfy one of them. Add filter parameters to Find and Filter actions in Shortcuts on Mac
Run it from Finder and inspect the results
In Finder, select one or more files, Control-click the selection, and choose Quick Actions followed by your shortcut. If the shortcut does not appear, confirm that Use as Quick Action is enabled and that Finder is enabled for the shortcut under System Settings > Privacy & Security > Extensions > Finder. Apple notes that Quick Actions can be run from a Finder selection. Run a shortcut while working on your Mac
To see what matched, add a result action after Filter Files, or use the shortcut’s output preview where appropriate. Run it first on a small, deliberately selected group so you can confirm the filter condition behaves as you intend. A filter returning no items can mean no selected file matched; it does not establish that no such files exist elsewhere on the Mac. If you want Finder itself to search a folder or broader location by criteria, use Finder’s search field and add criteria there. Finder can also save a search as a Smart Folder. Narrow your search results in Finder on Mac
Know what this shortcut does—and does not do
The key distinction is the variable’s contents: Shortcut Input represents the items sent into the shortcut, so the Filter Files action narrows that provided set. Selecting ten files in Finder gives the shortcut those selected items to work with; the filter is not a substitute for a Finder-wide search. If you need a reusable saved search over a location, Finder search and Smart Folders are the more direct built-in tools. If the goal is to filter a hand-picked selection before passing matched files to another shortcut action, this variable-based workflow keeps the scope explicit.
Sources
- Run a shortcut while working on your Mac — Apple Support
- Intro to Find and Filter actions in Shortcuts on Mac — Apple Support
- Use variables in Shortcuts on Mac — Apple Support
- Add filter parameters to Find and Filter actions in Shortcuts on Mac — Apple Support
- Narrow your search results in Finder on Mac — Apple Support