MathGroup Archive 2009

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

Search the Archive

Re: passing an array variable as a file name string to FindList

  • To: mathgroup at smc.vnet.net
  • Subject: [mg98258] Re: passing an array variable as a file name string to FindList
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Sun, 5 Apr 2009 06:30:10 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <gr4jg8$a6g$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de

Hi,

FileNames[]

alone is sufficient instead of Flatten[Table[FileNames[]]]

and

FindList[#,"Humpty Dumpty"] & /@ FileNames[]

will search for the giant goose egg in you files.

Regards
   Jens

Venkatesh Ramakrishnan wrote:
> Hi Everybody
>  
>  I have this problem for which I have to write a code -
>  
>  1. There is a directory that contains around 30,000 text files.
> 2. I wish to read each one of them and extract some information.
>  
>  Now,
>  
>  Flatten[Table[FileNames[]]]
>  
>  will give me all the file names in a table.
>  
>  So,
>  
>  An array variable with the subscript that contains the loop counter
> will
>  give me the filenames one by one.
> 
>  The question is, how do I pass the array variable as a String argument
>  to functions like -
>  
>  FindList[] 
>  ReadList[]
>  
>  and other text file manipulation commands?
>  
>  If anybody can shed some light on this, I would be very thankful.
>  
>  With best regards
>  Venkatesh
> 
> 


  • Prev by Date: Re: Minimize goes into infinite loop?
  • Next by Date: Re: Map to nested list
  • Previous by thread: Re: passing an array variable as a file name string to FindList
  • Next by thread: Re: passing an array variable as a file name string to FindList