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 and run a .exe), if there is no reply then do something else (skip the file copy and just run the .exe)
I can do the easy bits, copying and starting .exe 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 (last 3 lines of the code)
@echo off
del "%Programfiles%\FlightDeck" /q /f
mkdir "%Programfiles%\FlightDeck"
xcopy "\\aq-fs\fileshare_data\computers\share\Program Installs\FlightDeck" "C:\Program Files\FlightDeck" /e /q /c
cd "%Programfiles%\FlightDeck"
start AqualisaDashboard.exe
:end
Thanks!
I can do the easy bits, copying and starting .exe 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 (last 3 lines of the code)
@echo off
del "%Programfiles%\FlightDeck" /q /f
mkdir "%Programfiles%\FlightDeck"
xcopy "\\aq-fs\fileshare_data\computers\share\Program Installs\FlightDeck" "C:\Program Files\FlightDeck" /e /q /c
cd "%Programfiles%\FlightDeck"
start AqualisaDashboard.exe
:end
Thanks!