Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

NotebookDirectory[] and UNC paths

  • To: mathgroup at smc.vnet.net
  • Subject: [mg113471] NotebookDirectory[] and UNC paths
  • From: Ulf-Dietrich Braumann <braumann at uni-leipzig.de>
  • Date: Sat, 30 Oct 2010 04:37:03 -0400 (EDT)
  • Reply-to: braumann at uni-leipzig.de

Hi,

the following describes a marginal dysfunction of 
NotebookDirectory[] concering a missing leading $PathnameSeparator in UNC 
paths under v7, which was not there in v6:

Once logged in a Windows 2003 terminal server, one can navigate to 
directories mounted on a local client Windows XP PC. Those folders can be 
accessed using a special UNC (uniform naming convention) path, e.g. 
\\tsclient\V\notebooks (written in Mathematica as string 
"\\\\tsclient\\V\\notebooks").

Issuing the following from a previously stored notebook residing there, 
under v7 I get this failure:

In[1]:= ParentDirectory[NotebookDirectory[]]

During evaluation of In[1]:= ParentDirectory::npdir: \tsclient\V\notebooks\ has no parent directory. >>

Out[1]= ParentDirectory["\\tsclient\\V\\notebooks\\"]


Due to a wrongly returned UNC path, ParentDirectory[] fails. While using 
v6 it works:

In[1]:= ParentDirectory[NotebookDirectory[]]

Out[1]= "\\\\tsclient\\V"


Obviously, in v7 the command NotebookDirectory[] returns only one 
$PathnameSeparator ("\\") instead of required two. Maybe, this point (I 
expect the problem exists for any UNC path notations but not only for 
terminal clients) can be fixed in the coming v8.

Regards - Ulf-Dietrich


  • Prev by Date: Re: Importing data
  • Next by Date: Re: Determining the root of the characteristic equation for time
  • Previous by thread: Re: How to convert Inset graphics to absolute coords?
  • Next by thread: Re: NotebookDirectory[] and UNC paths