1.0

1.0 | 1 rating Rate this file 52 downloads (last 30 days) File Size: 2.4 KB File ID: #23794

Explore

by Jesse Hopkins

 

15 Apr 2009 (Updated 06 Nov 2009)

Code covered by BSD License  

Convenient way to open windows explorer.

Download Now | Watch this File

File Information
Description

% USAGE:
% explore
% opens explorer window to current file open in matlab editor. (if
% no file is open, then the current explorer window at current directory
% will be explored
%
% explore(file)
% opens explorer window to directory containing "file". This input
% can be a full-file-path, m-function name, or model name.
%
% explore(dir)
% opens explorer window to specified direcotry "dir". This input can
% be a full-path, relative-path, or just the name of any directory
% on the matlab path. Will open the first folder on the matlab-path
% matching the specified name.
%
%
% NOTE: You may change the executable called by explore.m. The default is
% "explorer". To change, use
% explore SetExplorerCommand <command>
%
% For example, to use UltraExplorer:
% explore SetExplorerComand 'UltraExplorer /p'
%
% Note that the path containing UltraExplorer.exe must be included
% in your Windows path environment variable.
%
% This setting is stored as a persistent variable, and will not be
% remembered between Matlab sessions, so this line should reside in
% your startup.m file to permanently change your explorer preference.
%

MATLAB release MATLAB 7.5 (R2007b)
Other requirements Windows Only
Zip File Content  
Other Files explore.m,
license.txt
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
15 Apr 2009 Stead Kiger

See also "Explorer Toolbar Shortcut"

http://www.mathworks.com/matlabcentral/fileexchange/14140

16 Apr 2009 Steen Johansen

Does not seem to work in 2007R:

>> explore
??? No appropriate method or public field builtinGetActiveDocument for class com.mathworks.mlservices.MLEditorServices.

Error in ==> explore at 45
string = char(com.mathworks.mlservices.MLEditorServices.builtinGetActiveDocument);

16 Apr 2009 Eric

Or just use the built in explorer command in DOS along with the ! functionality. Try from the command line:

!explorer (Will open explorer window at top level of windows directory)

!explorer . (Will open explorer window in PWD)

!explorer c:/temp (Will open explorer window at specific address)

28 Apr 2009 Jesse Hopkins

Eric, the point of this script is so that you don't have to type a full path-name to the explorer command. For example, say you have a m-file called my_func.m in some location on your matlab path. If you want to open an explorer window, you can simply type 'explore my_func'. Otherwise you would have to type !explorer c:\path\to\my_func.

Please login to add a comment or rating.
Updates
15 Apr 2009

updated description

06 Nov 2009

Fixed handling of double quotes. Now also allows for configurable executable to run (defaults to "explorer.exe"), useful if you are running a replacement for windows explorer.

Tag Activity for this File
Tag Applied By Date/Time
windows explorer Jesse Hopkins 15 Apr 2009 13:51:28
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com