4.61111

4.6 | 40 ratings Rate this file 152 downloads (last 30 days) File Size: 12.84 KB File ID: #331

uigetfiles

by Greg Aloe

 

03 Sep 1998 (Updated 29 Jul 2009)

Code covered by BSD License  

GUI for selecting multiple files useful before MATLAB® R14 (Windows only)

Download Now | Watch this File

File Information
Description

****************
NOTE: MATLAB®'s UIGETFILE function supports multiple file selection as of MATLAB® R14. Here's a link to the online documentation:

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/uigetfile.html
****************

This download is for Windows only. It is a DLL- and an M-file (the latter being the help), that together allow getting multiple file names.

There are two versions of this DLL available.

The first was tested on Windows 98 and Windows 2000 running MATLAB® 5.2 (R10) and 6.5 (R13), but should also run on Windows 95 as well as with other MATLAB® versions. However, it cannot be compiled into a standalone application.

The second was tested on Windows 98 and Windows 2000 running MATLAB® 6.0 (R12) and 6.5 (R13), but should also run on Windows 95. It will not run under MATLAB® 5.3.1 (R11.1) and previous. This version can be compiled into a standalone application.

Files included are the two DLL-files described above (each with a README), an M-file help file, and the CPP source.

To use the files, place the appropriate M-file and DLL-file in the same directory, and make sure that directory is on your MATLAB® path.

The original source files were written by Dave J Warren, based on Win32 API.

Acknowledgements
This submission has inspired the following:
GUI for Multivariate Image Analysis of Multispectral Images
MATLAB release MATLAB 5.2 (R10)
Zip File Content  
Other Files license.txt,
uigetfiles/src/uigetfiles.cpp,
uigetfiles/uigetfiles.m,
uigetfiles/WorksOnR10thruR13ButNotCompilable/README.txt,
uigetfiles/WorksOnR10thruR13ButNotCompilable/uigetfiles.dll,
uigetfiles/WorksOnR12thruR13IsCompilable/README.txt,
uigetfiles/WorksOnR12thruR13IsCompilable/uigetfiles.dll
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (41)
16 Nov 2001 Michael Spencer

You just saved me a ton of time. Thanks. Uigetfiles works flawlessly with MATLAB V6 and Windows 2000. This should have been part of MATLAB. What was the author of uigetfile thinking?

04 Jan 2002 Ariel Friedlander

This is fantastic. Agree this should have been product. Many thanks.

19 Mar 2002 anita narasimhan

hi
i am unable to open the *.dll and *.m file to review them.
i work on unix machines using MATLAB R12. could you
kindly send me the unzipped version of these two files
to my email given below?
nanita@mrsc.ucsf.edu
thank you
anita

13 Jun 2002 Chad English

Excellent function, works great. The only thing keeping it from a 5 is that you can't pass it an initial folder to start from. You can't do it with the standard uigetfile either, but I find it annoying to always have to go through a directory tree to get back to the folder I was just at.

01 Aug 2002 Katie Image

Matlab really needed this!
I find this very useful but something I'd really like to see added:
With uigetfile you can pass it a filter string like 'c:/data/*_input.mat' and it will open to the correct directory and filter on the string *_input.mat, with uigetfiles you can't pass it a directory or a string to filter on, it will filter on extensions only.

01 Aug 2002 Katie Image

Another comment:
You can't do multiple file types in uigetfiles, but you can in uigetfile. I wanted to use a filter of {'*.adv'; '*.mat'} which works in uigetfile, so the user can select to view either .adv files or .mat files but not both. With uigetfiles you can view both types together but not seperately... I'm looking forward to the next version of uigetfiles :)

26 Aug 2002 Adam Gordon

Works great! Thanks for your contribution.

10 Oct 2002 Chris Anderson

What a timesaver! Appears to work fine with MATLAB R13. Mathworks should seriously consider implementing this functionality within the standard uigetfile.

06 Jan 2003 William Buttler, Anh-Trinh Nguyen and Ch Buttler

Does not work correctly. In spite of the fact that the comments indicate the
Bug Fix in October 2002, the Bug still apparently exists. The real question is where
is it picking up its initial directory to select a file from? Supposedly you can pass
this variable in. We have. It doesn't work. It would be nice of the compilable code
were available. Then we might be able to debug it. The bub may be a
forward- or back-slash problem. Multiple selection capability is a good thing, however.

06 Jan 2003 William Buttler, Anh-Trinh Nguyen and Ch Buttler

The latest update works great! Latest Bug fix is in December 2002. Good Job.

23 Apr 2003 John Doe

Just what i was looking for...

06 May 2003 John Doe

Works well, but I can't compile programs using this function. I agree that Matlab should add this to the standard functions.

11 Aug 2003 Philip Requejo

Works great! Very helpful. Thanks.

25 Nov 2003 Noel Dacruz Evora

Very helpful but it's not possible to define a FILTERSPEC like '*xxx*.txt' in order to list all the files having the word xxx in their names.

19 Dec 2003 Mor Ftp

I think wish below is too much. That's work great. Thanks

06 Feb 2004 Andy Welch

Perfect-- just what I was looking for! Works as advertised!

10 Feb 2004 Trevor Fichera

Works well but does not allow user to specify choice of extensions (built-in uigetfile does). Would like to specify [f,p]=uigetfiles({'*.txt';'*.csv'}) and have same functionality as uigetfile except be able to select multiple files.

22 Mar 2004 Konstantin Galybin

Works superbly for less than 1048 files, but not any more...

20 May 2004 Tadas Surkys  
11 Aug 2004 Eric Zilli

works perfectly in winxp with matlab r13

18 Aug 2004 Gauthier Fleutot

works as expected, good work!
I would wish a 3rd output parameter: the index of the selected filter (see matlab's uigetfile).

08 Sep 2004 Dave Hankin

Works great on Windows XP Pro with R13, no need to compile. Just what I needed, thanks.

08 Nov 2004 Philippe Archambault

Exactly what I needed... Good work!

29 Nov 2004 Martin Panzner

works great, exactly what I was looking for

02 Dec 2004 Diego Andrés

Just what I needed, thanks it´s a very good tool !

12 Dec 2004 nickel nie

great!
my matlab is just 6.1.

07 Mar 2005 Young Hyun Kim

Thanks,it's great!

23 Jun 2005 Lingqing Zhang

Great code! Thanks.

19 Oct 2005 David Racine

Perfect

26 Oct 2005 M. Ayres

Great as a replacement for the horribly crippled uigetfile that comes with v7.

Would be even better if you could specify the the default file view, sort, and maybe window size.

22 Dec 2005 Scott Miller

Here's an update to my previous comments abouth running under R14 SP3. I was able to fix the aberant behaviour by putting

disp('');

ahead of uigetfiles as in the following example:

clear all;
close all;
set(0, 'DefaultFigurePaperOrientation', 'landscape');

%%
disp('');
[filenamesonly,pathname]=uigetfiles('*.txt','What files');

Apparently the "disp('');" changes the focus or something; at any rate it seems to work if the command window has been written to it before the dialog is called. In my earlier attempts from cell mode, I didn't have the disp command.

30 Jan 2006 Ben Rogers

Excellent, exactly what I needed, Cheers.

23 Mar 2006 Jonathan Victor

Does the job as a workaround for the R14 bug that prevents uigetfile from selecting a large number of files

20 Apr 2006 Tushar Gurjar

A Very Useful Script. Good work. Keep it up.

11 Jul 2006 jan becker

great!! this was exactly what I was looking for!!! saved me a lot of time!! thanks again

17 Aug 2006 chang xiaojian

haha thank u

17 Aug 2006 ripa tiger

When selecting multiple file names, the cell filename will put the final file at the first, and then put the other files, any reason about this?

10 Sep 2006 John Simons

Very useful for getting around the uigetfiles character limit, many people are having problems with.

07 May 2007 Gireesh E

nice one..but can I get a .dll for 64 bit windows?

06 May 2009 Sandeep Manyam

And Dave's legacy lives on

06 May 2009 Sandeep Manyam  
Please login to add a comment or rating.
Updates

modifying description

28 Oct 2002

Support for MATLAB Central submission of UIGETFILES has been transferred to Greg Aloe.

29 Oct 2002

Previously, MATLAB would report the same PWD before and after calling UIGETFILES; however, dir listings (LS, DIR) would incorrectly report files in the last dir accessed by UIGETFILES' GUI. Now, UIGETFILES returns to the original dir correctly.

26 Dec 2002

Added support for specifying a start path. Default start path is now the MATLAB PWD.

27 Dec 2002

v2.1: Made a tiny enhancement where the startpath now accepts path names the same way MATLAB does. For example, you can pass path separators as either "/" or "\".

27 Feb 2003

Uploaded 2 versions and the source cpp. One version works on MATLAB 5.2 (R10) through at least 6.5 (R13), but is not compilable into a standalone. The other works on 6.0 (R12) through at least 6.5 (R13), and can be compiled into a standalone.

09 Feb 2004

Included information in the MATLAB Central description on how to use the files.

24 Feb 2005

Update MATLAB Central description to point out that the functionality is now available in MATLAB R14's UIGETFILE function.

28 Feb 2005

Fix typo in description.

07 Apr 2005

Reword summary and description to be more accurate.

25 Oct 2005

Fixed typo in help about specifying a filter. Also added example with a filter and section about known bugs.

25 Oct 2005

Fixed typo in help about specifying a filter. Also added example with a filter and section about known bugs.

29 Jul 2009

Added registered trademark to MATLAB®.

Tag Activity for this File
Tag Applied By Date/Time
gui tools Greg Aloe 22 Oct 2008 06:36:38
example Greg Aloe 22 Oct 2008 06:36:38
select Greg Aloe 22 Oct 2008 06:36:38
multiple Greg Aloe 22 Oct 2008 06:36:38
files Greg Aloe 22 Oct 2008 06:36:38
uigetfile Greg Aloe 22 Oct 2008 06:36:38
uigetfiles Greg Aloe 22 Oct 2008 06:36:38
 

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