Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

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..