• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Batch command: User input with default entry

PliotronX

Diamond Member
Hey guys so I'm trying to automate a deployment a bit and am wondering if there is a way to not just get user input, but have a default, editable input. Assuming it's possible with batch scripting... Any idears?
 
The easiest way to get user input is in the form of yes/no questions, or menu options. What kind of input are you looking to capture and process?
 
The variable &1 is the first item passed from the command, &2 second and so on so the command "MYBATCHFILE.BAT DATA PASSED", within the batch file,
&1="DATA" and &2="PASSED". The series of:


@ %DEFAULT="whatever you want when nothing is passed to the batchfile"
@if "%1." == "." goto NOTPASSED
@call NEWPROGRAM &1
@goto END

:NOTPASSED
@Call NEWPROGRAM.EXE &DEFAULT
@goto END

:END


will get you as close as possible within the confines of a batch file.
 
Last edited:
Back
Top