Link to home
Start Free TrialLog in
Avatar of Lonelygirl_2012
Lonelygirl_2012

asked on

PAUSE not work in Batch file

Hello Experts,

I have an issue that the 'PAUSE' won't work at all and I have tried all methods, but when I opted-out the 'IF NOT...' statement, it will work.

Thank you for your help.

=======================================
@echo off
Ping www.google.com | find "Reply"
      echo ping to google successful
      IF NOT echo ping to google unsuccessful
Ping www.yahoo.com | find "Reply"
      echo ping to yahoo successful
       IF NOT echo ping to yahoo unsuccessful
@PAUSE
=======================================
ASKER CERTIFIED SOLUTION
Avatar of NVIT
NVIT
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Lonelygirl_2012
Lonelygirl_2012

ASKER

Thank you Steve Knight,

I wish I have to power to split the point for the two of you. Hope it not too late.
Don't worry, saw you had already accepted after I submitted.
@Lonelygirl_2012

If you do want to close the question differently you can use "Request Attention" and ask for the question to be reopened so you can close it differently.  Up to you...

~bp