Re: Filename as Function Argument"

*To*: mathgroup at smc.vnet.net*Subject*: [mg30148] Re: Filename as Function Argument"*From*: "Orestis Vantzos" <atelesforos at hotmail.com>*Date*: Tue, 31 Jul 2001 04:27:21 -0400 (EDT)*Organization*: National Technical University of Athens, Greece*References*: <9jlkdm$8ib$1@smc.vnet.net> <9k2dkg$2f7$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

When writing strings to be used as filenames, use double \ as in "c:\\my files\\blabla.txt" Certain combination of the form \+character (such as \n) are interpreted as "metacharacters" and the filename is not read properly. Since "\\" is the metacharacter for \, the use of \\ solves the problem. Orestis "Zakir F. Seidov" <seidovzf at yahoo.com> wrote in message news:9k2dkg$2f7$1 at smc.vnet.net... > With the similar problem of "filename as argument" I've crossed > when I used a long path for file of kind "C:\My Documents\1234.txt" > (I'm not sure that the case was axactly as this...): > > during the session it's all OK, > > BUT WHEN I SAVED notebook AND THEN RETURNED TO IT > INSTEAD OF MY "FILENAME' I've got SOMETHING ELSE?! > > I guessed that here backslash, \, was involved and so > I first copied the file into > C:\Program Files\Wolfram\Mathematica\4.0\1234.txt, > so that I need only use ReadList["1234.txt"]. > > I'm not sure that this is the case but may be it is clear for our dear > Mathematica Gurus (I mean dear Mathematica, and dear Gurus!) > what is the matter? > > Zak F. Seidov >