MathGroup Archive 2010

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

Search the Archive

Re: File names and strings

  • To: mathgroup at
  • Subject: [mg110958] Re: File names and strings
  • From: David Bailey <dave at>
  • Date: Wed, 14 Jul 2010 05:35:34 -0400 (EDT)
  • References: <i1hbiv$689$>

On 13/07/10 10:27, S. B. Gray wrote:

> In[867]:= num = 6;
> FileNames["Link*-n="<>  "06"]        (* Can't I use<>  here? *)

The asterisk stands for zero or more characters. You should have used 
FileNames["Link*-n="<>  "06*"] since none of your file names ended in 06.

> In[861]:= num=6;
> numstr=If[num<10, numstr="0"<>ToString[num],
>                     numstr = ToString[num]]
> FileNames["Link*"<>  ToString[numstr]]  (* No good also. ??  *)

Again, this failed for the same reason. Note also, that you really 
should decide if you are setting numstr inside the body of the If or 
outside it!

Note also that from experiment, it would seem that you can use 
"abbreviated patterns" - i.e. the asterisk, or string expressions (~~), 
but you can't mix the two.

David Bailey


  • Prev by Date: Re: deploying a package in human-unreadable form
  • Next by Date: Re: Chi Square Areas
  • Previous by thread: File names and strings
  • Next by thread: Re: File names and strings