Jump to content

How to open a random file (from a folder) with specific app?


Recommended Posts

My workflow should like the following:

- When I enter the keyword `randy`

- Alfred searches for a random markdown file with folder XY

- The output gets opened with my Markdown editor (iaWriter)

 

What I tried:

- Keyword setup

- `find FOLDER_NAME | /usr/local/bin/shuf -n 1` (returns a filename with complete path)

- Output filename in large type (shows me full path)

- 🛑 (v1) Open File; Setting: "Open the passed-in file" WITH "iA Writer"

- 🛑 (v2) Run script (Bash): `open $query -a /Applications/iA\ Writer.app`

- 🛑 (v3) Open URL (using iaWriter URL scheme): `ia-writer://open?path={query}`

 

How could I solve this challenge?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...