Re: [Activetcl] UNC-path
by Richard Toohey other posts by this author
Aug 7 2008 2:11PM messages near this date
view in the new Beta List Site
Re: [Activetcl] UNC-path
|
[Activetcl] test message, please ignore
Or you might be able to parse something useful out of 'net use'?
New connections will be remembered.
Status Local Remote Network
------------------------------------------------------------------------
-------
OK N: \\XXXXXXFS\STORAGE\DEVELOPMENT
Microsoft Windows
Network
OK R: \\XXXXXFS\STORAGE\CLIENTS
Microsoft Windows
Network
OK S: \\XXXXXXFS\STORAGE\SOFTWARE
Microsoft Windows
Network
Disconnected V: \\ABCDEF\ABCDEF Microsoft Windows
Network
OK Y: \\XXXXXFS\STORAGE\COMPANY
Microsoft Windows
Network
The command completed successfully.
Or maybe twapi can help? http://twapi.magicsplat.com/ - specifically
this stuff:
http://twapi.magicsplat.com/disk.html
HTH
-----Original Message-----
From: activetcl-bounces@[...].com
[mailto:activetcl-bounces@[...].com] On Behalf Of Jeff
Hobbs
Sent: Friday, 8 August 2008 8:52 a.m.
To: jonny.schonqvist@[...].com
Cc: activetcl@[...].com
Subject: Re: [Activetcl] UNC-path
jonny.schonqvist@[...].com wrote:
> How could i get the UNC-path from a mapped drive with tcl, is it
possible?
>
> Example
> This is what I could read from my script at my computer
>
> M:\scripts\utillities.tcl
>
> but here is where the file really is located
>
> \\SERVER1\path\to\scripts\utillities.tcl
>
> the path "\\SERVER1\path\to" is mapped at my computer as M:
> How could I extract the UNC-path?
While Tcl understands the UNC paths (low level, it uses native Win32
APIs), the mapping is done at the OS networking layer. It is likely
that you can pull this information from the registry though.
Jeff
_______________________________________________
ActiveTcl mailing list
ActiveTcl@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
ActiveTcl mailing list
ActiveTcl@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Jonny Schonqvist
Jeff Hobbs
Matthias Hoffmann
Christophe De Clercq
Richard Toohey
|