MathGroup Archive 2006

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

Search the Archive

Re: Strange use of FrontEnd`FileName


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