MathGroup Archive 2010

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

Search the Archive

Re: NotebookDirectory for package (.m) files?

  • To: mathgroup at
  • Subject: [mg110524] Re: NotebookDirectory for package (.m) files?
  • From: Hannes Kessler <HannesKessler at>
  • Date: Wed, 23 Jun 2010 01:52:47 -0400 (EDT)
  • References: <hviao8$h51$>

On 19 Jun., 13:47, "M.Roellig" <markus.roel... at> wrote:
> Hi group,
> i would like to create an application package that included a data
> directory that can should be accessable for commands in the
> application. Of course I can hard-code the path in my .m file but what
> is the proposed way to do this in case I would like to provide the
> package to other users which might install the package in a completely
> different directory?
> At first I thought that the Workbench should offer some capability of
> replacing Workbench$Path variables when the package is deployed to a
> folder, but this is not the case.
> I then thought about appending the data directory to the path using
> something like
> AppendTo[$Path, NotebookDirectory[]<>"/Data"]
> in the .m file which fails because a package file is not a notebook or
> has never been saved as on.
> Is there any way to derive the installation directory of an
> application from within the application?
> Cheers,
> Markus

System`Private`$InputFileName is another possibility although it may
change in the future:

Best regards,
Hannes Ke=DFler

  • Prev by Date: Re: Newby Q: How to specify reals
  • Next by Date: Re: calculating mean prediction bands
  • Previous by thread: Re: NotebookDirectory for package (.m) files?
  • Next by thread: whats wrong with this code ?!