From: Ehud Eilon on
Hello,

My function use a rmdir that refuses to be executed.
Let the relevant directory (defined in absolute path, not relative path) be called here x. Than the syntax is:

rmdir('x','s')

yields error message 'directory x doesn't exist!'

and yet, isdir('x') yields logical true (1); and when I repeat the same syntax (copy paste) from the debugger line matlab executes without objections.

Have anyone seen this kind of problem before?

Thanks,
Udi
From: news.mathworks.com on
Do a "rehash toolboxcache" on the matlab command line to update the
directory structure.

"Ehud Eilon" <ehudeilon(a)gmail.com> wrote in message
news:hntafp$nu4$1(a)fred.mathworks.com...
> Hello,
>
> My function use a rmdir that refuses to be executed. Let the relevant
> directory (defined in absolute path, not relative path) be called here x.
> Than the syntax is:
>
> rmdir('x','s')
>
> yields error message 'directory x doesn't exist!'
>
> and yet, isdir('x') yields logical true (1); and when I repeat the same
> syntax (copy paste) from the debugger line matlab executes without
> objections.
>
> Have anyone seen this kind of problem before?
>
> Thanks,
> Udi


From: Ehud Eilon on
Thanks for the quick answer, but I need to find a solution inside my function, while it's still running. When I'm at the command line it's already too late.
And no, adding "rehash toolboxcache" to the function before the rmdir line doesn't help, as well as adding "rehash" or "pause(1)"
:(

"news.mathworks.com" <murat.belge(a)mathworks.com> wrote in message <hntc42$mu2$1(a)fred.mathworks.com>...
> Do a "rehash toolboxcache" on the matlab command line to update the
> directory structure.
>
> "Ehud Eilon" <ehudeilon(a)gmail.com> wrote in message
> news:hntafp$nu4$1(a)fred.mathworks.com...
> > Hello,
> >
> > My function use a rmdir that refuses to be executed. Let the relevant
> > directory (defined in absolute path, not relative path) be called here x.
> > Than the syntax is:
> >
> > rmdir('x','s')
> >
> > yields error message 'directory x doesn't exist!'
> >
> > and yet, isdir('x') yields logical true (1); and when I repeat the same
> > syntax (copy paste) from the debugger line matlab executes without
> > objections.
> >
> > Have anyone seen this kind of problem before?
> >
> > Thanks,
> > Udi
>
From: Ashish Uthama on
On Thu, 18 Mar 2010 09:40:09 -0400, Ehud Eilon <ehudeilon(a)gmail.com> wrote:

> Hello,
>
> My function use a rmdir that refuses to be executed. Let the relevant
> directory (defined in absolute path, not relative path) be called here
> x. Than the syntax is:
>
> rmdir('x','s')
>
> yields error message 'directory x doesn't exist!'
>
> and yet, isdir('x') yields logical true (1); and when I repeat the same
> syntax (copy paste) from the debugger line matlab executes without
> objections.
>
> Have anyone seen this kind of problem before?
>
> Thanks,
> Udi

Is this a local directory? Are you creating it? There might be filesystem
delays causing this behavior.
When did you run the isdir('x')? [Protect your rmdir with a if(isdir(..))
in the function code. ]

From: us on
"Ehud Eilon" <ehudeilon(a)gmail.com> wrote in message <hntafp$nu4$1(a)fred.mathworks.com>...
> Hello,
>
> My function use a rmdir that refuses to be executed.
> Let the relevant directory (defined in absolute path, not relative path) be called here x. Than the syntax is:
>
> rmdir('x','s')
>
> yields error message 'directory x doesn't exist!'
>
> and yet, isdir('x') yields logical true (1); and when I repeat the same syntax (copy paste) from the debugger line matlab executes without objections.
>
> Have anyone seen this kind of problem before?
>
> Thanks,
> Udi

is your X local or remote(?)...

us