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

MathGroup Archive 2010

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

Search the Archive

Re: Trying to remove item from list of filenames

  • To: mathgroup at smc.vnet.net
  • Subject: [mg109707] Re: Trying to remove item from list of filenames
  • From: Albert Retey <awnl at gmx-topmail.de>
  • Date: Thu, 13 May 2010 07:23:21 -0400 (EDT)
  • References: <hse3or$379$1@smc.vnet.net>

Hi,


> I've been stumped on this for awhile.
> 
>  
> 
> I read in a list of filenames from a directory, using wildcards to capture
> all the files I want to process. However, a few files make it into the list
> that I don't want.  I these files have extra string of characters, that I
> should be able to remove using a regular expression and the appropriate
> Mathematica function.  Any thoughts?

that should be easy enough with StringCases. See the documentation for
details. In recent versions you can use RegularExpression or
StringExpression in the first argument of FileNames directly, too...

hth,

albert




  • Prev by Date: Re: Trying to remove item from list of filenames
  • Next by Date: Re: Trying to remove item from list of filenames
  • Previous by thread: Re: Trying to remove item from list of filenames
  • Next by thread: Re: Trying to remove item from list of filenames