?
Solved

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

Posted on 2003-10-24
10
Medium Priority
?
237 Views
Last Modified: 2010-05-01
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
0
Comment
Question by:gfahd1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 3
10 Comments
 
LVL 28

Expert Comment

by:vinnyd79
ID: 9616508
Have you tried Dir

if Dir("\\servername\sharename",vbDirectory) <> "" Then
    Msgbox "Share Exists"
Else
   MsgBox "Share Does Not Exist"
End if
0
 

Author Comment

by:gfahd1
ID: 9616643
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
0
 
LVL 28

Assisted Solution

by:vinnyd79
vinnyd79 earned 200 total points
ID: 9616785
Yes,but you must specify a servername as well as the sharename.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 9617578
Vinnyd is absolutely right, you most specy server name AND share name
0
 

Author Comment

by:gfahd1
ID: 9628551
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
0
 
LVL 28

Expert Comment

by:vinnyd79
ID: 9628571
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.
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 9628609
But that's no problem, since you can access the sahre server exists, or am i wrong?
0
 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 200 total points
ID: 9628628
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 9628643
My previous comment wasn't for you, Vinnyd :)
0
 

Author Comment

by:gfahd1
ID: 9628754
Thanks All for your help,
Richie, NetServerEnum will do the trick.

Thanks Again
0

Featured Post

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question