Checking to see of a folder exists
Hi Dave,
I was looking for a solution for checking the existence of a server and
found this post of yours and hoped it helps me, but it doesn't. It returns a
wrong False value if path to be checked consists of only the server name.
My aim is to separate cases of non-existence of a folder:
1. The folder doesn't exist on an existing server.
2. The folder doesn't exist because the server itself doesn't exist (e.g.
its name is mis-spelled).
Any idea?
Regards,
Stefi
€˛Dave Peterson€¯ ezt Ć*rta:
I've used this before, but it's untested, uncompiled here.
Dim TestStr as string
teststr = ""
on error resume next
teststr = dir("\\your\unc\path\here" & "\nul")
on error goto 0
if teststr = "" then
'not there
else
'is there
end if
Chuck M wrote:
Hi,
I'm using a DIR command to verify that a folder exists on a local C: drive.
If I need to check a folder on a network drive, can I use the mapped drive
letter or must I supply a UNC path to the DIR command. I don't have the
resources to test this myself.
TIA
--
Chuck M.
--
Dave Peterson
|