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.
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?
I know cmd.exe and I know Linux bash very well, but Powershell is new for me.
I get in Powershell the next error message
'while' is not recognozed as an internal or external command, operable program or batch file.
and the same error message for "{"