From: Derik on
I found this to be kind of interesting. I was trying to find all the subdirectories in my current directory when I used dir *.
In my 2009a and previous version of matlab it always returned just the directories. Now it is returning everything.
I tried a dos('dir *.') and that worked as expected, but I can't use the output. Anyone know if this is a bug in 2010a, or am I doing something incorrectly.

Thanks!
From: us on
"Derik " <derik.alles+matlab(a)gmail.com> wrote in message <hsf7bc$f7m$1(a)fred.mathworks.com>...
> I found this to be kind of interesting. I was trying to find all the subdirectories in my current directory when I used dir *.
> In my 2009a and previous version of matlab it always returned just the directories. Now it is returning everything.
> I tried a dos('dir *.') and that worked as expected, but I can't use the output. Anyone know if this is a bug in 2010a, or am I doing something incorrectly.
>
> Thanks!

well, no...
THIS is the classic DIR behaviour...
most likely you had some proprietary DIR in your older versions, which filtered non-folder stuff out...

us
From: Walter Roberson on
us wrote:
> "Derik " <derik.alles+matlab(a)gmail.com> wrote in message
> <hsf7bc$f7m$1(a)fred.mathworks.com>...
>> I found this to be kind of interesting. I was trying to find all the
>> subdirectories in my current directory when I used dir *.
>> In my 2009a and previous version of matlab it always returned just the
>> directories. Now it is returning everything.
>> I tried a dos('dir *.') and that worked as expected, but I can't use
>> the output. Anyone know if this is a bug in 2010a, or am I doing
>> something incorrectly.

> well, no...
> THIS is the classic DIR behaviour...
> most likely you had some proprietary DIR in your older versions, which
> filtered non-folder stuff out...

To cross-check: Derik was including a period in the name. Is it classic
DIR behaviour to discard that trailing period? It wouldn't be the
behavior I would expect on Unix systems, where the trailing period would
be treated as a literal, and only names ending in period would be returned.
From: Derik on
Walter Roberson <roberson(a)hushmail.com> wrote in message <RnGGn.6843$wV2.3222(a)newsfe23.iad>...
> us wrote:
> > "Derik " <derik.alles+matlab(a)gmail.com> wrote in message
> > <hsf7bc$f7m$1(a)fred.mathworks.com>...
> >> I found this to be kind of interesting. I was trying to find all the
> >> subdirectories in my current directory when I used dir *.
> >> In my 2009a and previous version of matlab it always returned just the
> >> directories. Now it is returning everything.
> >> I tried a dos('dir *.') and that worked as expected, but I can't use
> >> the output. Anyone know if this is a bug in 2010a, or am I doing
> >> something incorrectly.
>
> > well, no...
> > THIS is the classic DIR behaviour...
> > most likely you had some proprietary DIR in your older versions, which
> > filtered non-folder stuff out...
>
> To cross-check: Derik was including a period in the name. Is it classic
> DIR behaviour to discard that trailing period? It wouldn't be the
> behavior I would expect on Unix systems, where the trailing period would
> be treated as a literal, and only names ending in period would be returned.


From what I understand doing a dir *. should return everything that has no extension (the reason why I'm getting the folders) It works the way I expected using the DOS command. I didn't have any proprietary DIR in my previous versions of matlab, and it doesn't explain why it is working with the DOS('dir *.')

Thanks for the quick replies, can anyone else see if it is working the same way if they have 2010a installed as well. (I can only check 2008a and 2009a and they both behave the was I am expecting.)
From: James on
Yes, you received two quick replies from two people who obviously had no idea what they were talking about... or did not attempt to verify your problem before writing to this thread.

I recently installed Matlab 2010 and have run into this issue as well. Very frustrating... many legacy scripts no longer work properly as a result of this flaw. I, too, would be very interested to hear if there is a workaround of any sort available...

- James
 |  Next  |  Last
Pages: 1 2 3 4 5
Prev: autocorrelation
Next: resetting Gui Slider position