Software-OK
≡... News | ... Home | ... FAQ | Impressum | Contact | Listed at | Thank you |

  
HOME ► Faq ► FAQ - Windows cmd.exe Command-Prompt ► ««« »»»

Waiting for keyboard input Command prompt Script?


Often you want to stop the script in the batch file and wait for the user to press Enter, or variables to process on Windows 11, 10, ... and MS Server OS!





Here is a simple script, usually the pause command is used to wait until the user has pressed a key. The calculator script is well suited to understand how to read out / use the values ​​of the user input (under Windows 11, 10, .... and MS Server)!



Here  the values ​​are queried with set /p num1= and  set /p num2= and then added.

After the last  pause, you wait for any key and jump to the ":start" point!

Download: ►►►  Add-bat.bat!



@echo off
:start
 
 
echo Add-Operation
echo Please select the 2 numbers you want to add, confirm each number with ENTER
set /p num1=
set /p num2=
echo %num1%+%num2%?
pause
set /a Answer=%num1%+%num2%
echo %Answer%
pause
goto start
 
 
:e
echo. Finished!





(Image-1) Waiting for keyboard input Command prompt Script on Windows 11, 10, ...
Waiting for keyboard input Command prompt Script on Windows 11, 10, ...

-
▲ Back to the top ▲




FAQ 104: Updated on: 11 August 2021 17:39 Windows
Windows-Console

Command line arguments in the command prompt with examples!


For parameters that can be passed when the batch file is called and other variables via the set on Windows 11, 10, and MS Server OS Contents: 1.
Windows-Console

Files that are younger than the date can be deleted via the command line!


It is quite easy to delete files that are younger than a certain date via the command line under Windows 11, 10, and MS Server OS Everyone probably
Windows-Console

Delete all files except the most recent via command line, script or CMD.EXE?


It is easy to delete all files except the most recent via command line, script or CMD.EXE for Windows 11, 10, and MS Server The most popular script
Windows-Console

Ability to batch rename files in lower and upper case?


It is easy to rename files in batches using a script or command prompt in lower and / or upper case letters on Windows 11, 10, and MS Server OS Everyone
Windows-Console

Serial number of the hard disk under Windows 11, 10, ... via command prompt!


It is quite easy to find out the serial number of your hard disk under Windows 11, 10, or MS Server 2022, at a command prompt There are free hard
Windows-Console

Find out the PC serial number and manufacturer via command prompt?


Using the command prompt, it is easy to find out the PC serial number and manufacturer under Windows 11, 10, and MS Server OS Everyone has ► read out
Windows-Console

Lock the PC via the command prompt, Windows 11, 10, ...!


Locking Windows 11, 10, or MS Server 2022, 2019, is also possible via the command prompt It is not the fastest way to lock your Windows 11, 10,

»»

  My question is not there in the FAQ
Asked questions on this answer:
Keywords: windows, 11, 10, console, waiting, keyboard, input, command, prompt, script, stop, batch, file, wait, user, press, enter, variables, process, server, Questions, Answers, Software




    

  + Freeware
  + Order on the PC
  + File management
  + Automation
  + Office Tools
  + PC testing tools
  + Decoration and fun
  + Desktop-Clocks

  + SoftwareOK Pages
  + Micro Staff
  + Freeware-1
  + Freeware-2
  + Freeware-3
  + FAQ
  + Downloads

  + Top
  + Desktop-OK
  + The Quad Explorer
  + Don't Sleep
  + Win-Scan-2-PDF
  + Quick-Text-Past
  + Print Folder Tree
  + Find Same Images
  + Experience-Index-OK
  + Font-View-OK


  + Freeware
  + NonCompressibleFiles
  + 4ur-Windows-8-Mouse-Balls
  + 12-Ants
  + Q-Dir
  + DirPrintOK
  + FontViewOK
  + MeinPlatz
  + DesktopOK
  + ProcessKO
  + PAD-s


Home | Thanks | Contact | Link me | FAQ | Windows 2021 | Windows 10 | English-AV | Impressum | Translate | PayPal | PAD-s

 © 2023 by Nenad Hrg softwareok.de • softwareok.com • softwareok.com • softwareok.eu
0.078


► Workplace, This PC and computer, where is the difference? ◄

► Reset Internet Explorer settings in Windows 10, how to? ◄

► Delete Secure the Files and Shutdown the PC, the explanation! ◄

This website uses cookies to ensure you get the best experience on our website more Infos & Privacy Policy
....