Checking if a folder exists on a SAMAB Server using API Function

HI
I am using the filesystem function: FolderExists in VB 6 to determin if network share exists on a SAMAB Server : \\share
The FolderExists  function returns false, but the sahre exists (I can view it, copy to it, delete, etc... using Win explorer).
Is there a similar API function (With example) that I could use to check the samba share?

Thanks for your help
gfahd1Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

vinnyd79Commented:
Have you tried Dir

if Dir("\\servername\sharename",vbDirectory) <> "" Then
    Msgbox "Share Exists"
Else
   MsgBox "Share Does Not Exist"
End if
gfahd1Author Commented:
I did try Dir, but didn't work either.
It is not really a folder, I am checking the main root of the SAMBA share server to see if it is accessible.

Thanks
vinnyd79Commented:
Yes,but you must specify a servername as well as the sharename.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Richie_SimonettiIT OperationsCommented:
Vinnyd is absolutely right, you most specy server name AND share name
gfahd1Author Commented:
Hello,
Specifying a share name as well as a server name works fine. I thought there might be a way to check if the server exists, before I try to access the share. I might be wrong with my assumption.

Thanks
vinnyd79Commented:
You are wrong in assuming thay you can check the server in that manner.You can however check the server by pinging it assuming you are not blocking icmp packets.
Richie_SimonettiIT OperationsCommented:
But that's no problem, since you can access the sahre server exists, or am i wrong?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Richie_SimonettiIT OperationsCommented:
My previous comment wasn't for you, Vinnyd :)
gfahd1Author Commented:
Thanks All for your help,
Richie, NetServerEnum will do the trick.

Thanks Again
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.