Need fast way to find folders using DIR command

Hi - i'm trying to find only folders using the DIR command the fastest way possible. I realize the dir command returns a value "isdir" which can help you decipher this faster, however, i need something faster than that.
In past versions of maltab, i have been able to use something like
dir('C:\.*')
to bring up only folders....however this doesn't work now. any ideas? (or is my best bet to write a c function to do it?)

답변 (1개)

Matt Fig
Matt Fig 2011년 7월 1일

0 개 추천

What version are you using, because this works on 2007b:
dir('C:\*.') % Note the . and * are transposed from yours.

댓글 수: 3

right - it works on 2007b up to 2009B i think, but it doesn't work after that. I'm using 2011A
Matt Fig
Matt Fig 2011년 7월 1일
Did you try it with the . and * transposed from what you showed?
literally - the exact command was the same from version to version.
My simple example is this
dir('C:\.*')

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 File Operations에 대해 자세히 알아보기

제품

질문:

2011년 7월 1일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by