Is there anyway to have preset data for user input in a batch file?

前端 未结 8 1071
野趣味
野趣味 2020-12-06 19:52

So basically I have a batch file that requires alot of user input. I was wondering if it was possible to have any filler data already present when the question is asked, and

8条回答
  •  甜味超标
    2020-12-06 20:39

    Another alternative is ReadLine.exe:

    @echo off
    set NAME=First Last
    for /f "delims=" %%n in ('ReadLine -p "Enter name: " -- %NAME%') do set NAME=%%n
    echo You entered: %NAME%
    

    You can get it from http://www.westmesatech.com/misctools.html. Source code is included.

提交回复
热议问题