eager2learn
Honorable Member
- Joined
- Mar 27, 2017
- Messages
- 7
- Thread Author
- #1
A Windows system use an external drive N:.
A programs that use the external drive give sometimes an error message like "Directory N:\datastore is not available".
To test the continuous availability I write the next batch script.
:loop
@TimE /t >> N:\datastore\test_times.txt
@sleep 30
@goto loop
During the night this script stops in cmd.exe with the message: "The system cannot open the device or file specified".
It is intended that this script continues as soon as the disk is available again.
Is it possible to make such a batch script (maybe in powershell) that don't stop, but continues as soon as the disk is available again?
A programs that use the external drive give sometimes an error message like "Directory N:\datastore is not available".
To test the continuous availability I write the next batch script.
:loop
@TimE /t >> N:\datastore\test_times.txt
@sleep 30
@goto loop
During the night this script stops in cmd.exe with the message: "The system cannot open the device or file specified".
It is intended that this script continues as soon as the disk is available again.
Is it possible to make such a batch script (maybe in powershell) that don't stop, but continues as soon as the disk is available again?