AncientTiger
Programmer
This may be a forehead slapper, but I've got to ask it anyway because I'm stumped...
I need a way to check if a network drive is still available that doens't hang my program up for over a minute if the network went down sometime after the program is ran.
Here's what's happening. I have a program that communicates with files/folders on a network drive. ON startup, the program checks to see if the network drive is visible. If it is, it continues on its merry way. However, if after the program is running, the network goes down, my program hangs for a little over a minute before it reports that the network drive is no longer available. As in (Not Responding) hangs
The routine I currently have in place to confirm the network drive availability looks something like this:
As I said, if the network is up the the drive is visible when the program starts, no worries. But if it goes down, it's hanging me up pretty bad, and I'm at a loss on what to do.
Sorry if this is a noob question... self-taught programmers, OLD ones at that, sometimes need extra care and feeding
------------------------------------
Over 20 years of programming, and still learning every day!
I need a way to check if a network drive is still available that doens't hang my program up for over a minute if the network went down sometime after the program is ran.
Here's what's happening. I have a program that communicates with files/folders on a network drive. ON startup, the program checks to see if the network drive is visible. If it is, it continues on its merry way. However, if after the program is running, the network goes down, my program hangs for a little over a minute before it reports that the network drive is no longer available. As in (Not Responding) hangs
The routine I currently have in place to confirm the network drive availability looks something like this:
Code:
Set FSO = CreateObject("SCRIPTING.FILESYSTEMOBJECT")
'CHECK "HEARTBEAT"
DE = FSO.DRIVEEXISTS(MAIN.DRIVELETTER.Caption) 'The network drive letter
If DE = False Then CHECKNETDRIVE = False: Exit Function
As I said, if the network is up the the drive is visible when the program starts, no worries. But if it goes down, it's hanging me up pretty bad, and I'm at a loss on what to do.
Sorry if this is a noob question... self-taught programmers, OLD ones at that, sometimes need extra care and feeding
------------------------------------
Over 20 years of programming, and still learning every day!