Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*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 2006

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

Search the Archive

Re: reading all the files in one directory

  • To: mathgroup at smc.vnet.net
  • Subject: [mg68918] Re: reading all the files in one directory
  • From: "." <ggroup at sarj.ca>
  • Date: Wed, 23 Aug 2006 07:15:45 -0400 (EDT)
  • References: <eceitg$qje$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

You're somewhat light on details, so I can only guess at an appropriate
answer for your case.  One possibility is to use FileNames[] to get a
list of files.  Create a function which takes a single filename as its
argument, and apply it to the list.  For example:

myFiles = FileNames[];
myFunc[file_] := (tmp = Import[file,"Text"]; Print[file,"\n",tmp])
myFunc /@ myFiles;

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.
> 
> Many thanks
> Sofia


  • Prev by Date: Re: reading all the files in one directory
  • 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