This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set "Server=192.168.50.125" | |
set "RetryCount=0" | |
:CheckServer | |
rem Ping server only once with a time limit of 1000 ms. | |
%SystemRoot%\System32\ping.exe -n 1 -w 1000 %Server% >nul | |
if not errorlevel 1 goto MapDrive | |
rem Connection to server is not yet established. Give up after 30 seconds |