When writing a batch file to change my IP Address to Static I have created this working script but right now it shows
Changing IP address Waiting for "2" seconds and press any key to continue Changing Gateway Waiting for "2" seconds and press any key to continue Changing Subnet waiting for "2" seconds and press any key to continue
The way I want it to show is
Changing IP address Sits 2 seconds with no display of text Changing Gateway Sits 2 seconds with no display of text Changing subnet Sits 2 seconds with no display of text
Right now I'm using the timeout command
Below is a snippet of code
@ECHO IP Address Changed
timeout 2
@ECHO Subnet Changed.....
timeout 2
@ECHO Gateway Changed....
timeout 2
Anyone know how to do this with the timeout command or another command.. I'm just looking for it to look like it's changing each area 1 at a time
Use the following:
timeout /T 2 /NOBREAK > nul
The > nul
part redirects the output to the Null device, hence suppressing it. The /NOBREAK
option prevents the wait time to be interrupted by any key presses.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With