MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

FileNames[] in a loop..

  • To: mathgroup at smc.vnet.net
  • Subject: [mg62043] FileNames[] in a loop..
  • From: Uli Würfel <uli.wuerfel at fmf.uni-freiburg.de>
  • Date: Thu, 10 Nov 2005 02:50:26 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Hello Experts,

I want to carry out the same calculation repeatedly, but with different
sets of parameters. The parameters are located in files and I tried to use

dateien = FileNames["para*.txt"]

Then, I wanted to use a simple loop in the way:

For[i=1,i<=Length[dateien],
{
  str=OpenRead[dateien[[i]]];
  ---- Reading of parameters ---
  Close[str];
  -----calculations---
};
i++]

Unfortunately, it does not work.
Could you help?

Greetings,
Uli


  • Prev by Date: Re: Converting Rationals into Reals
  • Next by Date: Re: Read a delimited text file into a mathematica
  • Previous by thread: Re: n00b
  • Next by thread: Re: FileNames[] in a loop..