Re: [Tutor] python win32 drive mapping help

2009-09-26 Thread Alan Gauld
"Vineet Kothari" wrote I want to map c:/temp folder of A to C & c:/temp folder of B to C as well do some copying of data and then delete the mapping. I tried using the code given for mapping: import win32net win32net.NetUseAdd(None,1,{'remote':r'\\server\share','local':'K:','password':'XXX'

Re: [Tutor] python win32 drive mapping help

2009-09-25 Thread wesley chun
>> I tried this: >> win32net.NetUseDel(None, 1,{'local':'k:'}) >> >>  but I got this error: >> Traceback (most recent call last): >>  File "test.py", line 33, in >>    win32net.NetUseDel(None, 1,{'local':'k:'}) >> TypeError: an integer is required > > You have the wrong sequence for NetUseDel().  

Re: [Tutor] python win32 drive mapping help

2009-09-25 Thread Dave Angel
Vineet Kothari wrote: So What should be the attributes for the command? I tried this: win32net.NetUseDel(None, 1,{'local':'k:'}) but I got this error: Traceback (most recent call last): File "test.py", line 33, in win32net.NetUseDel(None, 1,{'local':'k:'}) TypeError: an intege

Re: [Tutor] python win32 drive mapping help

2009-09-25 Thread Vineet Kothari
So What should be the attributes for the command? I tried this: win32net.NetUseDel(None, 1,{'local':'k:'}) > but I got this error: Traceback (most recent call last): > File "test.py", line 33, in > win32net.NetUseDel(None, 1,{'local':'k:'}) > TypeError: an integer is required > So what

Re: [Tutor] python win32 drive mapping help

2009-09-25 Thread Dave Angel
Vineet Kothari wrote: Can you also help me out with the way to delete the mapped drive I know in command line it is net use [DRIVE:] /delete but I am unable to figure out how I can do it from python Since I am trying to make sure that the drive name I am giving in my code: impo

Re: [Tutor] python win32 drive mapping help

2009-09-24 Thread Vineet Kothari
Can you also help me out with the way to delete the mapped drive I know in command line it is > net use [DRIVE:] /delete > but I am unable to figure out how I can do it from python Since I am trying to make sure that the drive name I am giving in my code: > import win32net > win32net.NetUseAdd(

Re: [Tutor] python win32 drive mapping help

2009-09-24 Thread Vineet Kothari
Thanks a lot Vishwajeet & everyone else who replied. This is great I am glad now its working & I knew I was missing the module but somehow didn't know from where I would get that. But glad everything is working fine now. This is great community :) -- Regards, Vineet Kothari http://www.vineetkotha

Re: [Tutor] python win32 drive mapping help

2009-09-22 Thread Alan Gauld
"Dave Angel" wrote Traceback (most recent call last): File "test.py", line 31, in import win32wnet ImportError: No module named win32net But I'd point out an essential problem in your message: your error message isn't self-consistent, What Dave is getting at is that the import use

Re: [Tutor] python win32 drive mapping help

2009-09-22 Thread Dave Angel
Vineet Kothari wrote: Hi Everyone I saw alot of responses for python on this mailing list. I thought any python guru might wish to help me with little code to map two network drives on windows systems I have 3computers at different locations in a network A,B,C I want to ma

Re: [Tutor] python win32 drive mapping help

2009-09-22 Thread vishwajeet singh
On Tue, Sep 22, 2009 at 5:38 AM, Vineet Kothari wrote: > > Hi Everyone > > I saw alot of responses for python on this mailing > list. I thought any python guru might wish to help me with little code to > map two network drives on windows systems > > > I have 3computers at diffe

[Tutor] python win32 drive mapping help

2009-09-22 Thread Vineet Kothari
Hi Everyone I saw alot of responses for python on this mailing list. I thought any python guru might wish to help me with little code to map two network drives on windows systems I have 3computers at different locations in a network A,B,C I want to map c:/temp folder of A to