Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.6: Open generic files in a preferred app via Services' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.6: Open generic files in a preferred app via Services
Authored by: jc_helary on Feb 10, '10 07:47:41AM

I use a similar approach but the automation is not handled by Automator but by the command line.

1) Get Dterm here: http://www.decimus.net/dterm.php and set its trigger key (I use Option+Space)
2) open (or create) a file named ".bash_profile" at the root of your home directory
3) create command aliases for all the applications that you frequently use. For ex:

alias neo='open -a NeoOffice'
alias emacs='open -a Emacs'
alias tw='open -a TextWrangler'
alias edit='open -a TextEdit'
alias word='open -a Microsoft\ Word'

4) save the file and from Dterm type "source .bash_profile" so that Dterm can access all the newly defined aliases right away.

Now, when you have files you want to quickly open in a specific application, trigger Dterm and type the name of the alias you want and the name of the files that need to be open.

Since Dterm has full access to your shell, you can use all sort of wildcards/regexps/filters to select the files to process.

It could be for ex:

"neo *.doc" to open all the .doc files in the current directory with NeoOffice.

The biggest advantage Dterm has over Terminal is that Dterm automatically works on the current directory. For Terminal, you need to use things like "cd to…" (found here http://code.google.com/p/cdto/) first (launched from Spotlight eventually) and then you can do your things.




[ Reply to This | # ]