I would like to first suggest that there are at least 2 different Mapdrive UDFs in the UDF Forum... you might check those out, as there is no real need to reinvent the wheel.

But the problems and the 1's you are seeing are actually in your if statements:

Replace this:
Code:
 If $Drive NOT "" AND $Share NOT ""


with this:
Code:
if $drive and $share 



But if you really want to use the "Not"s, try this...

Code:
If not $Drive="" AND not $Share=""




As a side note, I had to laugh... I wonder if you come from a batch coding background... I was accused of liking "Not" when I first start posting here, and it was because all I had ever used was bat files.


Edited by Allen (2005-09-27 06:56 AM)
_________________________
(... better days ahead)