Message Boards Message Boards

3 Replies
0 Total Likes
View groups...
Share this post:

Package Directory?

You can tell what directory a notebook is in by using NotebookDirectory[ ].
Is there a way of obtaining the directory a loaded package is in?

POSTED BY: Frank Kampas
3 Replies

Thanks for the info. I have a further question: is there code you can put in the package that tells where the package is?

POSTED BY: Frank Kampas

If you want to know in witch directory your current pack is on runtime, you can use $InputFileName This is a problem when you test your code in the notebook, but run your package as a script. To solve this, I use my own function


so fileDirectory[] is independent over environment

POSTED BY: Rodrigo Murta


POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract