w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Windows Batch file (taking multiple input as same time and using them separately)
@ECHO OFF
SETLOCAL

SET /p userinput="please enter data separated by commas or spaces "
CALL :getarg 1
ECHO arg 1 is %argument%
CALL :getarg 3
ECHO arg 3 is %argument%
CALL :getarg 2
ECHO arg 2 is %argument%

GOTO :EOF

:getarg
CALL :nabarg %1 %userinput%
GOTO :eof

:nabarg
SETLOCAL
SET num=%1
:nabargl
SHIFT
IF %num% neq 1 SET /a num-=1&GOTO nabargl
endlocal&SET argument=%1
GOTO :eof

Simple!





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.