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.