MathGroup Archive 2009

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

Search the Archive

Re: TRANSFER FILE NAMES

  • To: mathgroup at smc.vnet.net
  • Subject: [mg100182] Re: TRANSFER FILE NAMES
  • From: "Sjoerd C. de Vries" <sjoerd.c.devries at gmail.com>
  • Date: Wed, 27 May 2009 04:08:17 -0400 (EDT)
  • References: <gvdr5r$71e$1@smc.vnet.net>

Alain,

Read the file names in a list and either loop over this list to read
in the data files or use Map or Apply to handle the list at once.

You keep on asking questions on file names and don't seem to make much
progress, do you? It looks like you're missing a bit of Mathematica
basics. I'd suggest you read more of the Mathematica introductory
texts.

Cheers -- Sjoerd


On May 25, 12:16 pm, Alain Mazure <alain.maz... at oamp.fr> wrote:
> Hi
>
>   I'm doing calculations on several files (C0156.txt ....) which works
> well for a given file
>
> When calling them one by one, I'm using a variable NAME in order to
> import it as in:
>
>          Needs["EDA`"]
>
>     NAME = "C0156";
> data = ImportData["Desktop/" <> ToString[NAME] <> ".txt",
>    HeaderLines -> 0, TrailerLines -> 0, UseVariables -> {1, 2, 3, 4},
>    FormatData -> False]
>
>    I would like to do that for all my files transfering the names by
> importing them from a file: names.txt
>
> The names (here only 1) are in the file names.txt which is imported via:
>
>      Import["Desktop/names.txt"]
>       C0156
>
> I dont succeed to transfer that info to the previous ImportData
> command in order to do that automatically
>
> Thanks
>
> Alain Mazure
>
> Laboratoire d'Astrophysique de Marseille
> P=F4le de l'=C9toile Site de Ch=E2teau-Gombert
> 38, rue Fr=E9d=E9ric Joliot-Curie
> 13388 Marseille cedex 13, France
>
> http://alain.mazure.free.fr/
>
> Mails:
> alain.maz... at oamp.fr
> alain.maz... at free.fr
>
> Phones:
> Lab: 33(0)491055902



  • Prev by Date: Re: Dynamic performance - input fields slow
  • Next by Date: Re: evaluating functions within Findminimum
  • Previous by thread: Re: TRANSFER FILE NAMES
  • Next by thread: Keep Slider Consistent With a Slow Graph