Services & Resources / Wolfram Forums / MathGroup Archive
-----

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: Fri, 3 Apr 2009 20:10:07 -0500 (EST)
  • 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: release memory
  • Next by Date: Re: release memory
  • Previous by thread: 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