MathGroup Archive 2009

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

Search the Archive

TRANSFER FILE NAMES

  • To: mathgroup at smc.vnet.net
  • Subject: [mg100117] TRANSFER FILE NAMES
  • From: Alain Mazure <alain.mazure at oamp.fr>
  • Date: Mon, 25 May 2009 06:17:27 -0400 (EDT)

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.mazure at oamp.fr
alain.mazure at free.fr

Phones:
Lab: 33(0)491055902


  • Prev by Date: Re: NIntegrate & Integrate
  • Next by Date: Re: Are you wolfing tonight?
  • Previous by thread: Re: Dynamic performance - input fields slow
  • Next by thread: Re: TRANSFER FILE NAMES