Check to see if Mapped UNIX drives are connected
I am fairly new to VB but have constructed a code within Excel to write files from a Windows emulator to a mapped UNIX drive.
I was just wondering if there is a command to check if the drive has been connected or not. This would then allow me to add a mapping part to my code if the drive had not been connected or at least a warning to the user to connect the drive.
Any help would be really useful, I have searched around the net and not found a thing that can help.
Paul
Re: Check to see if Mapped UNIX drives are connected
you can use the APIs getlogicaldrivestrings and getdrivetype, to return all the drives available and the type of each drive
also WNetGetConnection will return the unc path of the logical drive
Re: Check to see if Mapped UNIX drives are connected
Thanks, sorry for the late response but worked great!
Re: Check to see if Mapped UNIX drives are connected
Welcome to the forums. :wave:
If you consider this resolved, you could help us out by pulling down the Thread Tools menu and clicking the Mark Thread Resolved menu item. That will let everyone know that you have your answer.
Thank you. :)