Requires Mac OS X 10.1 or higher
HAMSoft Engineering allows free use of this code and/or software in its "as is" condition. HAMSoft Engineering disclaims any liability of any kind for any damages whatsoever resulting from the use of this code and/or software. If you find it useful please consider making a donation to help HAMSoft Engineering stay in business.
download the compiled command line tool
download the source code project
Use this command line tool to get the default application from Launch Services for either a file path, a file extension, or a URL.
[-path "path/to/file"] get the default application from a file path
[-ext "fileExtension"] get the default application from a file extension
[-url "someURL"] get the default application from a URL
Example usage of the tool with applescript:
Open this Script in your Editor