I’ve a little script that checks for the existence of a file share and if it exists checks for the most recent file. I’m running into an expected Loop error within one area of the code and am hoping someone can give me a hand. The error appears after the If statement starts but before the Else. I tried adding a Loop prior to the Else but that gave a syntax error.
Do Until objFile.AtEndOfStream
shelfPath = objFile.ReadLine
i = i + 1
WshNetwork.MapNetworkDrive driveLetter, shelfPath
If Err.Number <> 0 Then objCreateFile.Write(shelfPath + ” can’t be reached”)
Else
call checkShelf
End If
Loop