MathGroup Archive 2006

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

Search the Archive

Re: Strange use of FrontEnd`FileName

  • To: mathgroup at smc.vnet.net
  • Subject: [mg71715] Re: [mg71664] Strange use of FrontEnd`FileName
  • From: "厉正吉" <zhengji.li at gmail.com>
  • Date: Mon, 27 Nov 2006 04:04:38 -0500 (EST)
  • References: <200611260848.DAA14498@smc.vnet.net>

Philipp,

Firstly, see what's happened with the use of extract.

In[8]:=
"FileName" /. NotebookInformation[EvaluationNotebook[]]
Out[8]=
FrontEnd`FileName[{$RootDirectory, "C:", Documents and Settings", ...,
     "Desktop"}, Untitled-2.nb, CharacterEncoding -> WindowsANSI]
In[9]:=
Extract["FileName" /. NotebookInformation[
    EvaluationNotebook[]], {1}, FrontEnd`FileName]
Out[9]=
FrontEnd`FileName[{$RootDirectory, "C:", Documents and Settings", ...,
     "Desktop"}]

Secondly, ToFileName really works with
FrontEnd`FileName[{$RootDirectory, "C:", Documents and Settings", ...,
 "Desktop"}]. Let's check it out:

In[16]:=
FrontEnd`FileName[{$RootDirectory, "C:", "Desktop"}] // ToFileName (*
This is OK*)
Remove[test];
test[{$RootDirectory, "C:", "Desktop"}] // ToFileName (* This is bad *)
{$RootDirectory, "C:", "Desktop"} // ToFileName (* OK, too *)
Out[16]=
C:\Desktop\


  • Prev by Date: Re: Re: Limit of Infinitely Nested Expression (4.0
  • Next by Date: RE: Strange use of FrontEnd`FileName
  • Previous by thread: Re: Strange use of FrontEnd`FileName
  • Next by thread: RE: Strange use of FrontEnd`FileName