Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: Strange use of FrontEnd`FileName

  • To: mathgroup at
  • Subject: [mg71718] Re: [mg71664] Strange use of FrontEnd`FileName
  • From: "Chris Chiasson" <chris at>
  • Date: Mon, 27 Nov 2006 04:04:46 -0500 (EST)
  • References: <>

If the user works on a system where the kernel is run on a computer
with a different file system than that of the computer running the
front end, there needs to be a way to distinguish between the
different file systems. I wonder what else ToFileName can do.

I had to write an entire set of functions to handle the output of
$Input because it gives a relative path when executed inside a
package. I bet there is already a nice set of internal functions that
handles these situations. It would be great to see them
exposed/published for the users.

On 11/26/06, Philipp <Philipp.M.O at> wrote:
> In the Wolfram documentation (Services & Resources > Mathematica >
> Kernels and Programming) there is a method "How can I automatically set
> Mathematica's working directory to the same directory containing my
> notebook?"
> (
> The statement is,
> SetDirectory[ToFileName[
>  Extract["FileName" /. NotebookInformation[EvaluationNotebook[]], {1},
>    FrontEnd`FileName]]]
> Would somebody kindly explain to me as to why Extract wraps the
> extracted directory list in FrontEnd`FileName before ToFileName is
> applied?
> Nominally, it shouldn't work. The ToFileName documentation indicates
> that the directory argument can have "only" a String or List head.
> Cheers,
> Philipp.
> P.S. I realise FrontEnd`FileName has HoldAll attribute. This only leads
> to an additional question, why the directory list needs to be passed to
> ToFileName unevaluated. P.


  • Prev by Date: Re: SetPrecision vs N
  • Next by Date: RE: Using subscripts in function-parameter names
  • Previous by thread: Strange use of FrontEnd`FileName
  • Next by thread: Re: Strange use of FrontEnd`FileName