File Exchange

image thumbnail


version (1.48 KB) by Varun Gandhi
MACOPEN can be used to open a file or directory outside MATLAB on Mac OSX


Updated 01 Sep 2016

View License

MACOPEN FILENAME opens the file or directory FILENAME using the OPEN terminal command. Similar to the WINOPEN windows function in MATLAB.

% Examples:
% If you have Microsoft Word installed, then
% macopen('/myDoc.docx')
% opens that file in Microsoft Word if the file exists, and errors if it doesn't.
% macopen('/Applications')
% opens a new Finder window, showing the contents of your /Applications folder.

Cite As

Varun Gandhi (2020). MACOPEN (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (7)


Same error here, can't expand the zip file


Unable to expand "" into "Downloads" (Error 1 - Operation not permitted.)

I would recommend editing line 25 in the following way:
syscmd = ['open "', inp, '" &'];
This should work better, when accessing folders or files with spaces in the names.


It overcomes the "winopen" error on mac. Just what I need. Thanks.

It works very well. Thank you.


Updated license

MATLAB Release Compatibility
Created with R2012a
Compatible with any release
Platform Compatibility
Windows macOS Linux