Hello Dragon-IT, the script keeps sending Not on network message.
I changed ftpipaddress for the computer ip that has the ftp server and the way that sends a message because the CMD Console is totally hidden when the script runs.
I think i probably i need to do something more secure than just setting the server ip because that IP is very common here on many routers, probably the ip with a folder: 192.168.1.84/ftp/folder or something like this, but if that cant be done the ip its fine for now until i find another way to do this.
Modified script:
ping -n 2 -w 100 192.168.1.84 | find "Reply"
if errorlevel 1 msg * /time:5 "Not on network" & exit /b
msg * /time:5 "You are on the network do what is needed"
How do you see this?
Main Topics
Browse All Topics





by: dragon-itPosted on 2009-10-04 at 14:20:19ID: 25491030
You could ping the relevant server ip address. If you have VPN access and the user is VPN'd in then this would be seen as "internal" access to of course unless a firewall is blocking such access.
e.g.
ping -n 2 -w 100 ftpipaddress | find "Reply"
if errorlevel 1 echo Not on network & exit /b
echo You are on the network do what is needed.
Steve