|
From: | bondmatt |
Subject: | Re: General algorithm to find systematically named files in sub-directories |
Date: | Sat, 8 Jun 2013 16:56:13 -0700 (PDT) |
On 06/08/2013 04:53 AM, bondmatt wrote:
> The LATEX portion is holding me up at the moment but only because I need to
> bring myself up to speed on the language. If anyone knows how to put a
> header on the table of contents page...
I am not exactly sure what you mean, but have a look at the
\addcontentsline command:
\addcontentsline{toc}{section}{This text will appear in the toc and look
like a section}
> Depending on what is being tested the number of samples will vary. One
> thought is a sort of brute force search through all 999 possible folders but
> I am hoping there is a smarter way to do this?
If I understood correctly, you want to iterate over all files named e.g.
sample1.wav in all project_XXX subdirectories? IMHO the best way for
doing this would be something like:
files = glob("project_*/sample1.wav");
for f = files{:}'
disp(f{1});
endfor
glob gives you a cell array of all matching filenames and can also be
used to look in different subdirectories.
Cheers,
Markus
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
If you reply to this email, your message will be added to the discussion below:http://octave.1599824.n4.nabble.com/Generic-algorithm-to-find-files-in-systematically-named-sub-directories-tp4653862p4653892.htmlTo unsubscribe from Generic algorithm to find files in systematically named sub-directories, click here.
NAML
[Prev in Thread] | Current Thread | [Next in Thread] |