Tech Reflect
  • Home
  • About This Site
  • Contact me
  • Search Icon
Quick open files of a certain type

Quick open files of a certain type

2018-03-21

I’m not spending £19 an Alfred for just this one purpose, but for its seemingly endless uses that improve productivity. In this example, I’ll create a shortcut to open Xcode projects and workspaces.

Requirements

  • A utility application called Alfred
  • Purchasing the Powerpack for £19

Setup

  • Open Alfred Preferences
  • Click on Workflows
  • Click on the button at the bottom of the sidebar
  • Choose Templates > Files and Apps > File filter from keyword and open
  • Give it a name like “Open Xcode Project” and click OK
  • Double-click on File Filter
  • Enter “x” in the keyword field and uncheck “with space” (unchecked, this means the space is optional)
  • In the File Types field, click the button and navigate to an xcodeproj file
  • Optionally, do the same with an xcworkspace file

Optionally, you can click on the Search Scope tab and restrict the search to one or more directories.

Now, bring up Alfred
Type “xfoo” or “x foo” where “foo” is the name of a project and note it’s the first result to display. Just type “x<space>” and a space and see a list of Xcode projects

Since each search type is constrained to a file type and hierarchy, it’s extremely fast and every result is the type of item you want.

Extra credit

If you also use workspaces, you can set up a separate workflow triggered off another key like “w” with a different file type and location. Note that this can be applied to any file type and any location, making it superior to Spotlight for targeted searches.


macOS tips

Post navigation

NEXT
Create a test file of a certain size
PREVIOUS
Simple repeating command-line command
Comments are closed.

Get Monthly Updates

Recent Posts

  • Inserting random email sigs in Mail on iOS
  • Keep Instagram open to finish posting…
  • How I predicted the rise of Twitter, barely used it, and amassed 35,000 followers
  • Apple Books 2022, in pictures
  • Killing one bird with two-and-a-half stones in Mac OS X Mail

Categories

  • analog (1)
  • apple career (12)
  • apple inside (19)
  • apple stories (20)
  • bertrand serlet (3)
  • bugs (3)
  • essays (15)
  • geeky (21)
  • interviews (4)
  • iOS tips (4)
  • Mac OS X (7)
  • macOS tips (36)
  • personal (8)
  • predictions (1)
  • products (5)
  • prototypes (6)
  • scott forstall (7)
  • scripting (2)
  • siri (2)
  • steve jobs (16)
  • tim cook (1)
  • workplace (15)

Get Monthly Updates

About cricket


Me with Guiness the owl

25 years in tech. I like to write manifestos. I like to offer interesting tips. I like making fun of things. Everyone copes differently.

My Other Blogs

  • Free Range Parrots
  • Plucky Tree (personal)
© 2025   All Rights Reserved.