File Exchange Pick of the Week

February 19th, 2010

File and Folder Selection GUI

This week's Pick of the Week is uipickfiles, by Douglas Schwarz.

You may have noticed that we--that is, Bob, Jiro, and I--tend to Pick a lot of GUI tools. Though niche tools have their places, basic GUI components tend to be widely useful. Today's Pick is no exception.

Doug refers to his file as "uigetfile on steroids". No argument here; this function allows selection of files OR folders (in the non-exclusive sense of the term "or"), using a GUI to navigate easily around one's directories.

Doug tested his file on both Windows (XP) and Mac (OS X) platforms; I'll take his word for it that it works on the Mac. (As he points out, it is implemented entirely in MATLAB, so it should be platform-independent.) I did take it for a test drive on my Windows XP machine, and really liked the nice file-and-folder-picking (and list-sorting) interface. Uipickfiles facilitates filtering (including regular-expression filtering), and allows the user to select the class of the output--as cells, structures, or character arrays.

I particularly like how nicely Doug's code is implemented, commented, and documented. Very nice work, Doug!

Comments?


Get the MATLAB code

Published with MATLAB® 7.9

2 Responses to “File and Folder Selection GUI”

  1. Nathan replied on :

    What ultimately sold me on this submission was the regexp filter. I have a few programs that require only certain file types to be loaded at a time, with varying names. The regexp filter facilitated my task and now I have a much nicer program.
    Plus, the multiple file / folder selecting is VERY convenient, let alone the ability to sort the files. (uigetfile does allow multiple file selection, but the ordering is not as flexible)

    Thanks a lot, Doug, and thank you Brett for highlighting this wonderful submission.

  2. Hog replied on :

    It doesn’t work in R2008a on my Vista 32

Leave a Reply

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>

If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).


MathWorks

Brett & Jiro share their favorite user-contributed submissions from the File Exchange.

These postings are the author's and don't necessarily represent the opinions of The MathWorks.