20 March 2016, 05:00
I’ve been using Mac OS X for over a decade and have written books about how to use it, but today learned of a new way of opening files via the App Switcher.
Boy, did I feel dumb.
So, I thought it fun to write one of those Wikipedia-style posts about every possible way to open a file on Mac OS X – or at least every method that I’m aware of. See how many you know. Some tips below setup shortcuts that make it a one-click procedure in future to open the file – or even a no-click procedure! Read on to learn how!
The tips are numbered for ease of reference but they’re in no particular order.
- Within the app itself: Within the app itself click File > Open, or tap Cmd+O, and choose the file. Bonus tip: If you can see the file in a Finder window or on the desktop, drag it on top of the File Open dialog box to automatically switch to that directory and select the file.
- On the desktop via the Dock: Drag the file to the Dock icon for the app. Bonus tip: If the app’s icon won’t “accept” the file (i.e. OS X doesn’t think the file is one the app compatible with), drag the file to the Dock icon for the app and hold down Option (Alt) + Cmd.
- On the desktop via the Dock #2: Drag the file to the right of the Dock, just to the left of the Trash and to the right of any Stacks you have there. The file will be added as a one-file Stack and will open when clicked. To remove it, just drag it up and hold for a second or two.
- In a Finder window, or on the desktop: Right-click the file and select Open With. Bonus tip: Hold down Option (Alt) to select Always Open With. This will set the default app for that file – but NOT all files of that type, as with the File Info dialog box!
- In a Finder window, or on the desktop #2: Select the file (which can be done via the keyboard’s cursor keys), then tap Cmd+down.
- In a Finder window: Switch to the Applications list and drop a file on top of the app icon. Bonus tip: Hold down Cmd+Option (Alt) and drag the app icon to the Finder toolbar. In future you can drag files on top of this new icon to open them without having to switch to the Applications view.
- Via the App Switcher: Start dragging the file from the desktop or a Finder window, and then invoke the App Switcher (Cmd+Tab). Drop the file on top of the app’s icon. Bonus tip: You can increase/decrease the size of the App Switcher to make this easier.
- Via Mission Control/Expose: Start dragging the file and then invoke Mission Control using its keyboard shortcut. Then drop it on to a window belonging to the app.
- Via the command line: Open Terminal, type open, tap the spacebar, then drag and drop the file onto the Terminal window. Then hit Enter. Bonus tip: Type open -a and then the name of the specific app to avoid using the default, before dragging the file onto the Terminal window. For example, open -a “Microsoft Word” file.rtf. Type the app’s name as it appears in the Application list.
- Via Quick Look: Click the file, tap Space, and then click the Open With button at the top right. Bonus tip: Right-click this button to get a choice of apps.
- Via Spotlight: Open Spotlight (Cmd+Space), type the file’s name, ensure the file is top-most in the list, and hit Enter.
- Via a keyboard shortcut: This one’s a bit more complicated but only needs to be done once for each file you want to assign a shortcut to:
1. Open Automator, which you’ll find in the Applications list of Finder. If a file chooser appears, click New Document. Then click the Service icon, which is that of a cog.
2. In the search field of Automator, type Run Shell Script. Then drag the single result beneath this to the right of the window to where it reads Drag Actions Or Files Here To Build Your Workflow.
3. In the right of the window, delete the word cat and type open, then a space, before dragging and dropping the file onto the text cursor’s position.
4. Tap File > Save and give the new service a name. Something like Open file shortcut will be fine.
5. Close Automator, then open System Preferences. Click the Keyboard icon, then select the Shortcuts tab. Then select the Services entry in the list on the right.
6. Locate your new service in the list on the right. It’ll be near the bottom of the list. At the right of the entry in the list, where “none” appears, click and then click again, then actually hit the keyboard shortcut you want to use to open the file (i.e. type something like Option (Alt)+Shift+Cmd+O).
You can now close System Preferences, and try the shortcut to ensure it works.
- Via the menu bar: Another set of slightly complicated instructions but you’ll get the hang of it pretty quickly:
1. Install XMenu (it’s free). Open it, and then click its menu icon and select XMenu > Preferences.
2. Under the Menu heading of the dialog box remove all checks in boxes and put one alongside User-Defined.
3. Close the preferences dialog box, then open Finder and tap Shift+Cmd+G. Paste in ~/Library/Application Support/XMenu/Custom.
4. Drag aliases to the Finder window for any files you want to be able to open via the menu bar – holding down Option (Alt) + Command while dragging the file will create an alias.
- Via a spoken command: Feel like Captain Picard by saying, “Computer!” and then issuing a command, as follows:
1. Open System Preferences and click the Dictation & Speech icon. Click the On radio box and put a check alongside Use Enhanced Dictation. Follow the brief instructions provided.
2. Click the back button in System Preferences, then click the Accessibility icon. Select Dictation in the list at the left (it’s at the bottom), and then click the Dictation Commands button.
3. In the dialog box that appears, click the Enabled Advanced Commands checkbox, then click the plus button.
4. In the When I Say field, type what you’d like to say in order to open the document – something like open spreadsheet will do.
5. In the Perform dropdown list beneath this, select Open Finder Items, and then select your file. Then click Done.
6. Put a check alongside Enable the Dictation Keyword Phrase, and close System Preferences.
In future you can open the document by saying, “Computer, open spreadsheet” (or whatever command you entered).
Leave a comment...
One you missed: For force-opening a file with a program cmd (or cmd-option) drop a file on top of an app (on the dock or otherwise). This will force the app to try and open it.
This is useful when the extension is not set right or for ported programs that may not have their data properly set.
For example, MKVToolnix doesn’t usually understand AVI or MKV files you drop on top of its icon, but will with these keys pressed. Same with Java programs like Comicbooktagger.
This essentially triggers the “open” functionality of the program, so then the internal checks of the program need to analyze the file to see if it can be opened.
How about just double-clicking the file in the Finder?
— Rick · Mar 21, 08:49 AM · #