samintz Scott Mintz May 1,590 27 2015-01-21 #1 I came across a CMD batch file with this syntax: Code: if "%~1" == "/?" ( echo usage: ... goto :eof ) What does %~1 mean as opposed to just %1 ? I tried to test it and got the same results both ways.
I came across a CMD batch file with this syntax: Code: if "%~1" == "/?" ( echo usage: ... goto :eof ) What does %~1 mean as opposed to just %1 ? I tried to test it and got the same results both ways.
samintz Scott Mintz May 1,590 27 2015-01-21 #2 I found where this is documented in CMD. If you do: Code: CMD /c CALL /? It will show you the substitution of batch parameters syntax. For those interested: Code: %~1 - expands %1 removing any surrounding quotes (")
I found where this is documented in CMD. If you do: Code: CMD /c CALL /? It will show you the substitution of batch parameters syntax. For those interested: Code: %~1 - expands %1 removing any surrounding quotes (")