Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: How can get the Path of current Notebook ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg58729] Re: How can get the Path of current Notebook ?
  • From: David Bailey <dave at Remove_Thisdbailey.co.uk>
  • Date: Fri, 15 Jul 2005 14:14:11 -0400 (EDT)
  • References: <db7nen$mn4$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

quzhi at quzhi.net wrote:
> How can get  the Path of current Notebook ?
> 
> --
> http://www.quzhi.net
> quzhi at quzhi.net
> 
> 

Hello,

Here is some code that will do that.

NBPathName[nb_NotebookObject]:=ToFileName@("FileName"/.NotebookInformation[nb]
/.{"FileName"->""});

NBPathName[SelectedNotebook[]]

I have never understood why something like NBPathName is not built into 
Mathematica!

David Bailey
http://www.dbaileyconsultancy.co.uk



  • Prev by Date: Re: How can get the Path of current Notebook ?
  • Next by Date: Re: Light and surface colors
  • Previous by thread: Re: How can get the Path of current Notebook ?
  • Next by thread: Re: How can get the Path of current Notebook ?