Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
starting directory of uigetfile

Subject: starting directory of uigetfile

From: Yoav Rubin

Date: 1 Oct, 2007 20:21:49

Message: 1 of 5

Hi all, I am using uigetfile to select files, and I'd like
that every time I call uigetfile, the directory that it
opens in will be the last directory that a successful call
to uigetfile returned as a pathName. Is there a way to do it?

thanks
Yoav

Subject: starting directory of uigetfile

From: Adam

Date: 1 Oct, 2007 20:55:56

Message: 2 of 5

"Yoav Rubin" <yoavrubin@hotmail.com> wrote in message
<fdrkst$ml4$1@fred.mathworks.com>...
> Hi all, I am using uigetfile to select files, and I'd like
> that every time I call uigetfile, the directory that it
> opens in will be the last directory that a successful call
> to uigetfile returned as a pathName. Is there a way to do it?
>
> thanks
> Yoav

%1st call
[fileName pathName] = uigetfile('', 'Pick File');

%2nd call
[fileName pathName] = uigetfile(pathName, 'Pick File');

help uigetfile for more info

~Adam

Subject: starting directory of uigetfile

From: Yoav Rubin

Date: 3 Oct, 2007 13:26:52

Message: 3 of 5

"Adam " <not.my.email@mathworks.com> wrote in message
<fdrmss$4l0$1@fred.mathworks.com>...
> "Yoav Rubin" <yoavrubin@hotmail.com> wrote in message
> <fdrkst$ml4$1@fred.mathworks.com>...
> > Hi all, I am using uigetfile to select files, and I'd like
> > that every time I call uigetfile, the directory that it
> > opens in will be the last directory that a successful call
> > to uigetfile returned as a pathName. Is there a way to
do it?
> >
> > thanks
> > Yoav
>
> %1st call
> [fileName pathName] = uigetfile('', 'Pick File');
>
> %2nd call
> [fileName pathName] = uigetfile(pathName, 'Pick File');
>
> help uigetfile for more info
>
> ~Adam
Hi, thanks for the help, I've tried your advice but it
didn't work. I think you wrote how to do it with uigetdir.
Moreover,I didn't find in the help (and in the uigetfile
source code) any reference to the option you've mentioned.
Do you have any other idea?
thanks in advance
Yoav

Subject: starting directory of uigetfile

From: Adam

Date: 3 Oct, 2007 13:38:07

Message: 4 of 5

"Yoav Rubin" <yoavrubin@hotmail.com> wrote in message
<fe05as$7ar$1@fred.mathworks.com>...
> > > Hi all, I am using uigetfile to select files, and I'd like
> > > that every time I call uigetfile, the directory that it
> > > opens in will be the last directory that a successful call
> > > to uigetfile returned as a pathName. Is there a way to
> do it?
> > >
> > > thanks
> > > Yoav
> >
> > %1st call
> > [fileName pathName] = uigetfile('', 'Pick File');
> >
> > %2nd call
> > [fileName pathName] = uigetfile(pathName, 'Pick File');
> >
> > help uigetfile for more info
> >
> > ~Adam
> Hi, thanks for the help, I've tried your advice but it
> didn't work. I think you wrote how to do it with uigetdir.
> Moreover,I didn't find in the help (and in the uigetfile
> source code) any reference to the option you've mentioned.
> Do you have any other idea?
> thanks in advance
> Yoav
 
I execute those exact lines above.

What OS are you using? I'm on XP so the file system handles
 a filter '*.jpg' the same as it handles a directory, so I
can pass 'c:\temp\*.jpg' and it will navigate there. If
you're Mac, linux, etc I have no idea.

Mabye you can massage pathName into something that works?

Good Luck,
Adam

Subject: starting directory of uigetfile

From: Yoav Rubin

Date: 3 Oct, 2007 14:09:26

Message: 5 of 5

"Adam " <not.my.email@mathworks.com> wrote in message
<fe05vv$hlk$1@fred.mathworks.com>...
> "Yoav Rubin" <yoavrubin@hotmail.com> wrote in message
> <fe05as$7ar$1@fred.mathworks.com>...
> > > > Hi all, I am using uigetfile to select files, and
I'd like
> > > > that every time I call uigetfile, the directory that it
> > > > opens in will be the last directory that a
successful call
> > > > to uigetfile returned as a pathName. Is there a way to
> > do it?
> > > >
> > > > thanks
> > > > Yoav
> > >
> > > %1st call
> > > [fileName pathName] = uigetfile('', 'Pick File');
> > >
> > > %2nd call
> > > [fileName pathName] = uigetfile(pathName, 'Pick File');
> > >
> > > help uigetfile for more info
> > >
> > > ~Adam
> > Hi, thanks for the help, I've tried your advice but it
> > didn't work. I think you wrote how to do it with uigetdir.
> > Moreover,I didn't find in the help (and in the uigetfile
> > source code) any reference to the option you've mentioned.
> > Do you have any other idea?
> > thanks in advance
> > Yoav
>
> I execute those exact lines above.
>
> What OS are you using? I'm on XP so the file system handles
> a filter '*.jpg' the same as it handles a directory, so I
> can pass 'c:\temp\*.jpg' and it will navigate there. If
> you're Mac, linux, etc I have no idea.
>
> Mabye you can massage pathName into something that works?
>
> Good Luck,
> Adam
Hi Adam, I guess that I didn't understand proprly your first
reply, and I've just passed the PathName as a first argument
and didn't concat to it the file filter. Now I know what to
do, thanks for all your help

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us