Is there a way of selecting and opening many files with the uigetfile (or
similar)???
As a workaround I've tried to make a "minibrowser" using listdlg to list the
files and directories in a directory but:
It it possible to have Matlab know which are files and which are
directories?
tnx
/M
---------
%minibrowser
ok=-1;
while ok ~= 0
d = dir;
wdir=['''' pwd ''''];
str = {d.name};
[selected,ok] = listdlg('PromptString',['Files in ', pwd], 'Name','Select
multiple files:',...
'SelectionMode','multiple','ListString',str);
if ok == 1
if isempty(findstr('.',char(str(selected(1)))))==1 %Does the
file name contain a dot ~= directory!
directory=['''' char(str(selected(1))) '''']
%Add '' in case the dir.name contains a spacechar.
eval(['cd ', directory]);
%Change directory to 'directory'
elseif (selected(1) == 1) | (selected(1) == 2)
cd ..
else
ok=0;
end
end
end
-------------
--
*****************************************************************
Marcelo Soto Thompson, MSc Eng.Phys., PhD-student
Atomic Physics, Dept. of Physics, Lund Institute of Technology
P.O. Box 118, SE-221 00, Lund, Sweden
Phone:+46-46-222 82 22 Cell:+46-702-77 20 98
Fax:+46-46-222 31 77 www-atom.fysik.lth.se :-D
*****************************************************************
Marcelo Soto Thompson wrote:
> Hi everyone,
> Is there a way of selecting and opening many files with the uigetfile (or
> similar)???
This is quite a common question! If you search the archives of the group, or
look at user contributed m-files at Mathworks' web site, I believe you will find
several ways of doing it.
> As a workaround I've tried to make a "minibrowser" using listdlg to list the
That's a reasonable approach - especially if you are building your own GUI.
> files and directories in a directory but:
> It it possible to have Matlab know which are files and which are
> directories?
The isdir field of the structure returned by the dir command contains this
information.
HTH
Alex
--
Alex Knight http://motility.york.ac.uk:85/
see help DIR
d=dir(...) return a structure with a 'isdir' field: d.isdir
HTH
Ghassan
Soon I will need to select multiple files. I like uigetfile, but it
doesn't allow ctrl-mouseclick or shift-mouseclick selection.
I intend to use an ActiveX control. It should be very simple to
implement.
BTW, TMW really should get this working. Their controls lag those of
the
Windows OS, and probably many others.
--
Michael Robbins, CFA
Director, Debt Capital Markets
Canadian Imperial Bank of Commerce, World Markets
New York
Sent via Deja.com
http://www.deja.com/
Michael Robbins wrote:
--
Michael Crump
Postgraduate Researcher / PhD Candidate
Sir Lawrence Wackett Centre for Aerospace Design Technology
Department of Aerospace Engineering
RMIT University
GPO Box 2476V
Melbourne, Vic 3001
AUSTRALIA
Ph: +61 3 9647 3089
Fax: +61 3 9647 3050
Sorry to have taken your time. Tnx anyway.
/M
"Michael" <s940...@student.rmit.edu.au> wrote in message
news:3A3800E9...@student.rmit.edu.au...