From help-request at octave dot org Mon Jul 12 03:34:32 2004 Subject: Re: loading 100-200 .dat From: Stefan van der Walt To: help at octave dot org Date: Mon, 12 Jul 2004 10:32:19 +0200 Or do it directly in Octave: --- files = glob('*.dat'); for i = 1:length(file) load(files{i}) endfor --- If David's patch gets applied, it would simply become for f = glob('*.dat') load(f) endfor Regards Stefan On Sun, Jul 11, 2004 at 04:35:19PM -0600, Dmitri A. Sergatskov wrote: > mimo wrote: > > Hi there, > > > > Is there a convenient way to load all .dat in one directory. Just don't know > > how to tell octave to get all .dat fiiles one by one. I've been searching > > quite a while... pretty sure it's merely one line for experienced :-) > > > > thomas > > > > I would write an .m file that loads all those files. You can write a simple > shell script to create the .m file, e.g.: > > (in your terminal shell)$ for i in *.txt ; do echo load ${i} ; done > loadall.m > > Then execute 'loadall' in octave... > > Regards, > > Dmitri. ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------