MathGroup Archive 2006

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

Search the Archive

Re: reading all the files in one directory


Ana Sofia Figueiredo wrote:

> Hi,
> 
> Could anyone please tell me how can a read all the files in one directory?
> I have to read around 60 files with odd names.
> 

FileNames["*",yourdirectoryasstring]

will give a list of all files within that directory. you can than loop over
them to read each in turn, or of course map the corresponding function onto
the list, e.g. if the files contain mathematica input:

Map[Get,FileNames["*",yourdirectoryasstring]]


hth

albert


  • Prev by Date: Graph inside another graph
  • Next by Date: Re: reading all the files in one directory
  • Previous by thread: Re: reading all the files in one directory
  • Next by thread: Re: reading all the files in one directory