Is there a simple way to get all of the filenames in a directory with
paths, including the subdirectories? I'm writing a recursive dir but
it occurred to me someone has probably written a one-liner already.
Subject: Extract all filenames in a directory tree
On Jun 9, 11:21=A0am, "us " <u...@neurol.unizh.ch> wrote:
> spasmous:
> <SNIP looking for a recursive file liste(ne)r...
>
> there are quite a few utilities on the FEX, just look for
> them...
>
Hi us. I saw a couple... meh, ugly. There must be a one line
solution ;)
Subject: Extract all filenames in a directory tree
spasmous:
<SNIP looking for a one-line recursive folder lister...
> There must be a one line solution...
unfortunately: NO - if you want to stay within ML...
otherwise, this might be of interest
% on a wintel system
[r,r]=system('dir /S /B *.m');
% followed by
r=strread(r,'%s');
% -or- (depending on what unix-flavor you have)
[r,r]=system('ls -Rp */*.m');
us
Subject: Extract all filenames in a directory tree
spasmous <spasmous@gmail.com> wrote in message
<23f218e1-fb2b-438f-b039-1562c9956c42@s21g2000prm.googlegroups.com>...
> Is there a simple way to get all of the filenames in a
directory with
> paths, including the subdirectories? I'm writing a
recursive dir but
> it occurred to me someone has probably written a one-liner
already.
>
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Disclaimer prior to use.