• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Halting batch execution untill network connections are established ?

boran

Golden Member
Hi, I'm using some file syncronisation software etc, that I run on both my desktop as well as my laptop, but the problem is that my laptop doesnt immediatly see my desktop over the lan, (and I check the presence of my desktop using an IF EXIST) because of this I have to add a delay, but this delay is about 15 seconds, or 5, depending on how fast I type my password. my question is now:

is there a possibility to halt my batchfile, and have it check the network for 20 seconds or so, and as soon as it finds the network it continues execution, after those 20 seconds of not finding the network it should branch of too EOF and do nothing (the laptop is not at home, or the network is down)

thanks in advance.
 
as far as I see it'll be manageable with some ping commands, stacked in a loop with a counter. hope it works.
 
thanks for the app, but that isnt it.

atm I have a working setup that uses this as a startup sequence:

psexec \\laptopben -n 15 -s sleep.exe 1
IF %ERRORLEVEL%==0 goto openVerbinding

sleep 10

psexec \\laptopben -n 15 -s sleep.exe 1
IF %ERRORLEVEL%==0 goto openVerbinding

sleep 10

psexec \\laptopben -n 15 -s sleep.exe 1
IF %ERRORLEVEL%==0 (goto openverbinding) ELSE goto end

which works tho it's a bit ehm, a shotgun approach.
 
Back
Top