MathGroup Archive 2007

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

Search the Archive

forming filename string

  • To: mathgroup at smc.vnet.net
  • Subject: [mg84041] forming filename string
  • From: man_koshi <meetquant at yahoo.com>
  • Date: Fri, 7 Dec 2007 03:10:39 -0500 (EST)

Hi, I am new to mathematica, and I just wanted to Import some of .nb files into it, and then export it into different format. I can do it one by one, but I want to form varying 'filename'. Can you check what's wrong with it.

Do[infile=StringForm["\"U:\\\\data\\\\file``.nb\"",i]; outfile=StringForm["\"U:\\\\datao\\\\file``.tex\"",i]; x=Import[infile];Export[outfile,x];,{i,0,10,1}]

I am getting errors like:

Import::chtype: First argument "U:\\data\\file0.nb"
     is not a valid file, directory, or URL specification.

Export::chtype: First argument "U:\\datao\\file0.tex" is not a valid file specification.

BUT IF I DO:
Import["U:\\data\\file0.nb"] it works! so is not an invalid file address. I guess there is some requirement for filename string??

Please help.


  • Prev by Date: Contour Lines colored by temperature scale
  • Next by Date: Re: Finding position of an element in a list:
  • Previous by thread: Re: Contour Lines colored by temperature scale
  • Next by thread: Re: forming filename string