Zorawar
0
Q:

batch file with flags

:processargs
SET ARG=%1
IF DEFINED ARG (
    IF "%ARG%"=="/r" ECHO You passed the /r flag.
    SHIFT
    GOTO processargs
)
0
FOR %%A IN (%*) DO (
    IF "%%A"=="/r" ECHO You passed the /r flag.
)
0

New to Communities?

Join the community