- May
- 609
- 4
@READY[x:] is very slow to return 0 when the x drive is not reachable. NET USE is very fast, though, so here's my solution:
Unfortunately, this will always return 0 for a drive that is not a network drive.
Code:
FUNCTION NETREADY=`%@if["%@word[0,%@execstr[net use |! ffind /k /m /t%@left[1,%1]:]]" eq "OK",1,0]`
Unfortunately, this will always return 0 for a drive that is not a network drive.