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 #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
path | text | Yes | Required. A file, a folder or an app. | |
app | text | A bundle id or name of the app to open it with. |
Every step also accepts label, onFailure, timeout and dryRunSafe.
Examples #
- Open Downloads
- Open notes.txt in TextEdit
Gotchas #
The file must exist when the step runs. Check first with a
fileExistscondition if it might not.To launch an app and bring it forward, Activate app is the better step.