Code covered by the BSD License  

Highlights from
uigetdir2

5.0

5.0 | 3 ratings Rate this file 3 Downloads (last 30 days) File Size: 2.22 KB File ID: #9521

uigetdir2

by Chris Cannell

 

05 Jan 2006 (Updated 18 Apr 2007)

Directory selection dialog box which remembers the last directory selected.

Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

| Watch this File

File Information
Description

Wrapper for Matlab's UIGETDIR function which adds the ability to remember the last selected directory. UIGETDIR2 stores information about the last selected directory in a mat file which it looks for when called.

MATLAB release MATLAB 7.1.0 (R14SP3)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
17 Apr 2007 jonny e

Doesn't work for me. Doesn't "remember" last directory visited...maybe I am doing something wrong

17 Apr 2007 Chris Cannell

Jonny,
   Is the directory from which you call the script writable? The script saves a small mat file in the directory from which the script is called. Also, directories are only remembered if the selection is completed (i.e. if you cancel the selection dialog no directory will be remembered).

22 Apr 2007 Chris Cannell

The problem Jonny reported has been fixed and the script works fine. Thank you.

01 Oct 2008 jonny e

indeed! it works now...thanks!

Please login to add a comment or rating.
Updates
18 Apr 2007

Added a check for empty string passed as first argument so you can specify dialog text as the second argument and still make use of the last used directory feature. Thanks to Jonathan Erickson for the bug report.

Tag Activity for this File
Tag Applied By Date/Time
gui tools Chris Cannell 22 Oct 2008 08:11:23
example Chris Cannell 22 Oct 2008 08:11:23
uigetdir uigetfile directory selection dialog remember last fold Chris Cannell 22 Oct 2008 08:11:23
potw Shari Freedman 05 Jan 2010 11:39:04
example Philip Chen 14 Apr 2010 23:04:49
pick of the week Jiro Doke 11 Feb 2011 20:15:38

Contact us at files@mathworks.com