# Network connectiviy test batch file

June 17, 2009 at 08:50:38
Specs: Windows XP
 I am trying to making a batch file that needs to check for network connectivity. If there is a reply then do one thing (copy some files), if there is no reply then do something else (start a .exe)...I can do the easy bits, copying and starting programs etc but have no idea about the network test. I am guessing that I need to use the IF statement but I have never used this before. Can anybody help out?This is my current code. I basically want to run this if there is network connectivity but if there is no network connectivity then to only run the .exe@echo offdel "C:\Program Files\FlightDeck" /f /qmkdir "C:\Program Files\FlightDeck"xcopy "H:\computers\share\program installs\FlightDeck" "C:\Program Files\FlightDeck" /e /q /ccd "C:\Program Files\FlightDeck"start AqualisaDashboard.exe:endThanks!

See More: Network connectiviy test batch file

#1
June 17, 2009 at 16:40:11
 It's all good I figured it out, works like a dream!! Code bellow for future reference:::Flight Deck/Aqualisa Dash Board Start up@echo offif exist "\\aq-fs\fileshare_data\computers\share\Program Installs\FlightDeck\AqualisaDashboard.exe" goto :onlinegoto :offline:onlinedel "%Programfiles%\FlightDeck" /q /fmkdir "%Programfiles%\FlightDeck"xcopy "\\aq-fs\fileshare_data\computers\share\Program Installs\FlightDeck" "C:\Program Files\FlightDeck" /e /q /ccd "%Programfiles%\FlightDeck"start AqualisaDashboard.exegoto :end:offlinecd "%Programfiles%\FlightDeck"start AqualisaDashboard.exegoto :end:endexit

Report •
Related Solutions