Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / programming

Get user input from DOS prompt

5.00/5 (1 vote)
16 Nov 2010CPOL 7.1K  
Below should work without GOTO's...Took me awhile to find this while having to do build scripts.IF %uname% == ( ECHO Hello %uname%...) ELSE ( ECHO error ...)
Below should work without GOTO's...
Took me awhile to find this while having to do build scripts.

IF "%uname%" == "" (
    ECHO Hello %uname%...
) ELSE (
    ECHO error ...
)

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)