Skip to Main Content Skip to Search
Product Documentation

winopen - Open file in appropriate application (Windows)

Syntax

winopen(fileName)

Description

winopen(fileName) opens fileName in the associated Microsoft Windows application. The application is associated with the extension in fileName in the Windows operating system. filename is a string enclosed in single quotes. winopen uses a Windows shell command, and performs the same action as double-clicking the file in the Windows Explorer program. That is, winopen calls the application associated the file extension to open the file. Use an absolute or relative path for fileName.

Examples

Open the file thesis.doc, located in the current folder, in the Microsoft Word program:

winopen('thesis.doc')
 

Open myresults.html in the system Web browser:

winopen('D:/myfiles/myresults.html')
 

On Microsoft Windows platforms, open the current folder in the Windows Explorer tool:

winopen(cd)
 

To open a file on the MATLAB path, use winopen with which. For example, to open the meshgrid function in the Editor, use:

winopen(which('meshgrid'))

See Also

dos | open | web

How To

  


» Learn more
» Download free kit
» Get trial software

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS