Introduction to pause commands in DOS _dos/bat

Source: Internet
Author: User

There is a command in the DOS command is pause, its function is to output the message "Press any key to continue ...", and then the user will tap a key after the program continues to run.

Pause it prompts "Press any key to continue ...", the pause command has no arguments, its command is itself, and when the pause command runs, it interrupts the executed statement. This interrupt is not stopped immediately, just paused, and the following statement continues after any key is pressed. And should be used more than once, in a batch command, you can try multiple pause commands.

I want to customize this hint text and change it to something else. Like "Please press any key to start or end" or directly remove the prompts, retain the pause function, in the following ways to achieve:

Copy Code code as follows:

echo, press any key to start or end

Pause>nul

Explanation: The second sentence function is to remove the hint "please press any key to continue ...", the first sentence is you want to output the content of the hint

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.