You can use WSH
lcUncPath = ""
loNet = CREATEOBJECT("Wscript.Network")
loPrinters = loNet.EnumPrinterConnections()
FOR i=0 TO oPrinters.Count-1 STEP 2
? i, loPrinters.Item(i), loPrinters.Item(i+1)
IF loPrinters.Item(i) == "LPT1"
lcUncPath = loPrinters.Item(i+1)
EXIT
ENDIF
ENDFOR
? lcUncPath
>Hi !!
>
>When i try to copy any text file on my printer using
>
>API function CopyFile("filename","LPT1:",0)
>it works fine.
>
>But in case, i am using a shared printer, i have to specify the shared printer path (\\servername\sharedprinter)
>
>With the help help of which API function , i can get the the path my lpt: is mapped to ?
>Please Help
>
>Note : also suggest me some good book on using API from visual foxpro.
>
>Regards
>Sunny
--sb--