help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: General algorithm to find systematically named files in sub-director


From: bondmatt
Subject: Re: General algorithm to find systematically named files in sub-directories
Date: Sat, 8 Jun 2013 16:56:13 -0700 (PDT)

Thank you Markus!

For the LATEX question (I have been meaning to go post on a LATEX forum) I have a company logo on all other pages in the header. For the TOC page I am unable to put this logo in the header. A page break is inserted without  a pagebreak command. The TOC is not long enough to force this, it is very short as I currently generate a report with no input data, i.e. WAV files, so it is pretty well empty. I end up with a page with the logo in the header but with nothing else on it and a TOC page with no logo in the header. I tried \nopagebreak[4] but this had no effect.

The glob command is exactly what I was looking for!


On Sat, Jun 8, 2013 at 6:48 PM, Markus Appel [via Octave] <[hidden email]> wrote:
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.html
To unsubscribe from Generic algorithm to find files in systematically named sub-directories, click here.
NAML



View this message in context: Re: General algorithm to find systematically named files in sub-directories
Sent from the Octave - General mailing list archive at Nabble.com.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]