troubleshooting Question

How do I test for valid file path if it is UNC.

Avatar of ADawn
ADawn asked on
Visual Basic Classic
9 Comments1 Solution679 ViewsLast Modified:
Hello,

VB6 (sp5)

I use chech for a valid file path:  

MyFilePath= C:\Data\Data.mdb

If Len(Dir$(MyFilePath)) = 0 or Dir$(MyFilePath) = "" then
Msgbox "Your File Was Not Found"
End if

How do I check for a vaild path if my client uses a Universal Naming Convension (UNC) like

\\My server\ whatever   ?????

The code I use checks for a Drive letter (C:\) , but if no drive letter is used, the code fails each time with a 'File Not Found' error message 75. I don't what to use the error meesage to catch an invalid path.

Thanks, ADawn
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 9 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros