[Date Index] [Thread Index] [Author Index]
Re: Filename as Function Argument"
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 >