Browse the docs

Open file or folder

Opens a file or folder with its default app, or with an app you choose.

Open path with app

Keyboard Maestro: Open1File, OpenFile

Details #

Opens the file or folder at path, as a double click in Finder would. A folder opens in Finder. A leading ~ stands for your home folder.

Set app to open the file with a specific app instead of the default one.

If nothing exists at the path, the step fails with "no file or folder at" and the full path. The path may use variables, for example ~/Downloads/{{name}}.pdf.

The step also accepts file as another spelling of path. Its output holds the path.

Parameters #

ParameterTypeRequiredValuesWhat it does
pathtextYesRequired. A file, a folder or an app.
apptextA bundle id or name of the app to open it with.

Every step also accepts label, onFailure, timeout and dryRunSafe.

Examples #

Open the Downloads folder (really opens it)
Do
  1. Open Downloads
Open in Switchboard to try it
Open a text file in TextEdit (really opens it)
Do
  1. Open notes.txt in TextEdit
Open in Switchboard to try it

Gotchas #

  • The file must exist when the step runs. Check first with a fileExists condition if it might not.

  • To launch an app and bring it forward, Activate app is the better step.

See also #

Open URL, Activate app