
You can pass files and folders to a Mac shortcut by configuring the shortcut to receive input from Finder, then selecting the items and running the shortcut from the Finder Quick Actions menu or the macOS Services menu. You can also drag selected files or folders onto the shortcut in the Shortcuts app.
Quick Answer
- Open Shortcuts on your Mac and create or edit a shortcut. 2. Open the shortcut’s Details panel. 3. Turn on Use as Quick Action. 4. Choose Finder as the application where the shortcut is available. 5. Set the shortcut to receive Files and Folders as input. 6.
How Shortcut Input Works
In Shortcuts, input means the information passed into a shortcut when you run it. For a file-processing shortcut, the input is usually one or more files or folders selected in Finder.
A shortcut can receive input from several places, including:
- Finder
- The Shortcuts app
- The Share menu
- Drag and drop
- Other shortcuts
When you run a shortcut from Finder, the selected files or folders become the shortcut’s input. Actions inside the shortcut can then use those items.
For example, a shortcut that compresses files might receive selected files as input and pass them to the Create Archive action. A shortcut that converts images might pass the selected images to an image-conversion action.
Method 1: Run a Shortcut from Finder
This is the most convenient method for routine file and folder tasks.
1. Create or open a shortcut
- Open Shortcuts on your Mac.
- Click All Shortcuts in the sidebar.
- Do one of the following:
– Click the + button to create a new shortcut.
– Double-click an existing shortcut to edit it. - Give the shortcut a clear name, such as Convert Selected Images or Move Selected Files.
Add the actions that should process the selected items. If you are building a new shortcut, search the action list for the operation you need, such as Rename File, Move File, Create Archive, or Convert Image.
2. Enable the shortcut as a Finder Quick Action
- With the shortcut open, click the Details button in the upper-right corner. It may look like an information button.
- Turn on Use as Quick Action.
- Select Finder from the list of available applications.
Depending on the shortcut and your macOS setup, you may also see options for making the shortcut available from the Services Menu or the Share Sheet. Finder is the important choice when you want to run it by Control-clicking files or folders.
3. Choose the accepted input types
In the same Details panel, find the input settings. Select the types of data the shortcut should accept.
Choose:
- Files if the shortcut should process individual files.
- Folders if it should process folders.
- Both Files and Folders if it should accept either type.
If an input filter is available, use it to limit the shortcut to appropriate file types. For example, an image-conversion shortcut can be limited to image files. A shortcut that works with any selected item should accept both files and folders.
Avoid restricting the input unnecessarily. If the shortcut is configured to accept only images, it may not appear when you select a PDF or folder in Finder.
4. Make sure the actions use the shortcut input
A shortcut can be available in Finder but still fail to do anything useful if its actions do not use the received input.
In the shortcut editor:
- Click the first action that should process the selected item.
- Check whether the action has an input field.
- If necessary, click the input field and choose Shortcut Input.
Shortcut Input is the variable containing the files or folders passed to the shortcut. In some actions, it appears automatically. In others, you may need to select it manually.
For example, a Rename File action should receive the selected files as its input. A Move File action should also receive the selected files or folders before specifying the destination.
5. Run the shortcut from Finder
- Open Finder.
- Select one or more files or folders.
- Control-click the selection, or right-click it.
- Point to Quick Actions.
- Click the name of your shortcut.
The shortcut runs on the selected items. If the shortcut asks for confirmation, choose the appropriate option.
If the shortcut does not appear immediately, check the Quick Actions submenu. You may need to move the pointer over the submenu briefly before the available actions appear.
Important warning about file changes
A shortcut can rename, move, overwrite, or delete files without giving you a second opportunity to recover them. Before testing a shortcut that changes files, use copies of your data or select a temporary test folder.
If an action may overwrite existing files, enable any available confirmation option. Also review the actions carefully before running the shortcut on a large selection.
Method 2: Drag Files or Folders onto a Shortcut
Dragging items onto a shortcut is useful when you want to test it or run it occasionally.
Drag from Finder to the Shortcuts app
- Open Finder and locate the files or folders.
- Open Shortcuts.
- Select the files or folders in Finder.
- Drag them onto the shortcut in the All Shortcuts view.
Shortcuts receives the dragged items as input and runs the shortcut.
If the shortcut opens for editing instead of running, drop the items on the shortcut’s tile or name in the shortcut list rather than inside the editor. The exact behavior can vary depending on where you release the selection.
Drag onto a shortcut saved in Finder
You can also save or expose a shortcut in Finder when using it as a Quick Action. The Finder method is generally more reliable for everyday use, but drag and drop can be convenient for a shortcut that you run manually.
If drag and drop does not work, confirm that the shortcut accepts the type of item you are dragging and that its actions are configured to use Shortcut Input.
Method 3: Use the Share Menu
The Share menu is useful for shortcuts that process one file or a small group of files from another app.
Configure the shortcut
- Open the shortcut in Shortcuts.
- Click Details.
- Turn on Show in Share Sheet.
- Configure the accepted input types, such as Files, Images, PDFs, or Folders, if available.
Run the shortcut
- Select or open the file in an app such as Finder, Preview, or Safari.
- Click the Share button.
- Choose the shortcut.
The selected item is passed to the shortcut as input.
The Share menu is not always the best choice for large groups of files or folders. Finder Quick Actions provide a more direct workflow when you routinely process multiple items.
How to Process Multiple Files or Folders
When you select several items in Finder, the shortcut usually receives them as a group. The actions you use determine whether the shortcut processes them together or one at a time.
For actions that can handle multiple items, pass Shortcut Input directly into the action. For actions that need to process each item separately, add a repeat action:
- Add Repeat with Each to the shortcut.
- Place the file-processing actions inside the repeat block.
- Use Repeat Item as the input for those actions.
For example, use Repeat with Each when you want to rename every selected file individually. If you want to create one archive containing all selected items, pass the entire Shortcut Input collection to Create Archive instead.
Test both single-item and multi-item selections. Some shortcuts work correctly with one file but produce unexpected results when they receive several files or folders.
How to Pass a Folder’s Contents Instead of the Folder
Selecting a folder and passing it to a shortcut does not always mean the shortcut will automatically receive every item inside that folder. In many cases, the shortcut receives the folder itself.
To process the folder’s contents:
- Add an action that gets the contents of a folder, such as Get Contents of Folder.
- Set the action to use Shortcut Input as the folder.
- Pass the resulting files to the next action.
- Add a repeat action if each file must be processed separately.
If you need to include files inside nested subfolders, look for an option that includes subfolders or use a repeat structure that examines each folder. Test this with a copy of the folder before processing important data.
How to Limit a Shortcut to Certain File Types
Input restrictions help prevent a shortcut from appearing for incompatible items.
When configuring the shortcut’s Quick Action or Share Sheet settings, specify suitable types, such as:
- Images
- PDFs
- Text
- Documents
- Folders
- Media
You can also add a filtering action inside the shortcut. For example:
- Receive Shortcut Input.
- Add Filter Files or a comparable filtering action.
- Set a condition, such as file extension, name, or creation date.
- Pass the filtered results to the next action.
Filtering inside the shortcut is useful when you want the shortcut to appear for a broad set of selections but process only matching files.
Troubleshooting
The shortcut does not appear in Finder
Check these settings:
- Open Shortcuts.
- Edit the shortcut.
- Click Details.
- Confirm that Use as Quick Action is turned on.
- Confirm that Finder is selected.
- Confirm that the shortcut accepts the type of item you selected.
Then return to Finder and Control-click the selection again. Look under Quick Actions.
If the shortcut still does not appear, quit and reopen Finder or restart the Mac. Also check whether the shortcut is available under the Services submenu instead.
The shortcut appears but does not process the files
The actions may not be receiving the selected items.
Open the shortcut and inspect the first processing action. Replace a missing or incorrect input with Shortcut Input. If you use a repeat block, make sure the actions inside it use Repeat Item rather than the original shortcut input.
Adding Quick Look or Show Result temporarily can help you confirm what the shortcut receives. Remove debugging actions after testing if you do not need them.
The shortcut works with files but not folders
Open the shortcut’s input settings and enable Folders. Then check whether the actions support folders. Some actions work only with individual files and cannot process a folder directly.
If you need to work with the items inside a folder, add Get Contents of Folder before the processing actions.
The shortcut works with one item but fails with several
The shortcut may be expecting a single file. Add Repeat with Each to process the selected items individually, or change the action so it accepts the entire group.
Also check for actions that produce one result for the whole selection instead of one result per item.
macOS asks for permission
A shortcut may need permission to access files, folders, or another app. Read the prompt carefully before allowing access. Grant only the access needed for the task.
If you deny access, the shortcut may stop or return an error. You can review app permissions in System Settings, although the exact privacy category depends on what the shortcut is trying to access.
The shortcut changes the wrong files
Stop using it immediately and review every action that moves, renames, replaces, or deletes data. Test the shortcut with duplicate files in a temporary folder.
If a rename or move operation already occurred, use Command-Z in Finder when available. Undo is not guaranteed for every shortcut action, so maintain backups and test destructive workflows carefully.
Frequently Asked Questions
Can I pass both files and folders to the same shortcut?
Yes. Enable both Files and Folders in the shortcut’s input settings. The actions must also support both types, or the shortcut should separate them with filtering or conditional logic.
Can I run a shortcut without opening the Shortcuts app?
Yes. Configure it as a Finder Quick Action, then run it from Finder’s Control-click menu. You can also use the Share menu or a keyboard shortcut if you configure one through the available Quick Action or Services settings.
Why is my shortcut not listed under Quick Actions?
It may not be configured for Finder, may accept a different input type, or may be available under Services instead. Open the shortcut’s Details panel and verify its Quick Action and input settings.
How do I stop a shortcut from processing folders?
Configure the shortcut to accept only Files, or add a filter that removes folders before the main actions run.
Can a shortcut process files inside subfolders?
Yes, but you must configure it to retrieve folder contents and, when necessary, include nested folders. Use a test folder first, especially if the shortcut moves, renames, or deletes items.
Final Thoughts
The simplest way to pass files and folders to a Mac shortcut is to enable Use as Quick Action, select Finder, and configure the accepted input types.