Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Mapping a drive to a network path

Reply
Thread Tools

Mapping a drive to a network path

 
 
Thierry Lam
Guest
Posts: n/a
 
      07-22-2005
In DOS, if I want to map a network path to a drive, I do the following:

net use z: \\computer\folder

How do we do something similar in python?

Thanks
Thierry

 
Reply With Quote
 
 
 
 
Jeff Epler
Guest
Posts: n/a
 
      07-22-2005
import os
os.system(r"net use z: \\computer\folder")

Something in the win32net module of win32all may be relevant if you
don't want to do it through os.system:
http://aspn.activestate.com/ASPN/doc...eAdd_meth.html

Jeff

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFC4UoOJd01MZaTXX0RAr50AJwOJllwuunKWBI/rn/9fxwP4cbx6wCghph7
JL0TrNKLmhjMxfhu89SiDLU=
=10nq
-----END PGP SIGNATURE-----

 
Reply With Quote
 
 
 
 
Jeff Epler
Guest
Posts: n/a
 
      07-22-2005
in fact, see this thread, it may have something useful for you:
http://mail.python.org/pipermail/pyt...il/000959.html

Jeff

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFC4UprJd01MZaTXX0RAhA4AKCjK+QFtl1MVktAKIpwwI nIBXPjOwCfa5+h
d4qLKTeAuDOa+uv8QUMYvgs=
=Ho3U
-----END PGP SIGNATURE-----

 
Reply With Quote
 
Thierry Lam
Guest
Posts: n/a
 
      07-22-2005
Thanks, that helps.

Thierry

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mapping A Network Drive On My Home Network From Another Location Fred Atkinson Cisco 4 02-18-2008 03:08 PM
how to check whether a drive is a network drive or drive from attached hard-disk shailesh Python 1 03-28-2007 12:57 PM
Mapping network drive Windwatcher Wireless Networking 5 05-09-2006 08:04 PM
Mapping network drive Kwyjibo MCSE 2 04-21-2004 08:07 PM
Mapping users to a network drive on a microsoft server cromi Computer Support 2 09-06-2003 01:32 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57