windows - if statement not working batch -
so have batch file has this:
if "%1" == "dev" ( rem ... ) else ( rem else ... ) and have echo command above if-else block
echo "%1" >> test.txt the content of test.txt after running "dev" (with double quotes). however, hit else block instead of if block. checked putting echo command inside else ()
else have in same line of ) , (
if /? show usage:
if exist filename ( del filename ) else ( echo filename not found ) or in 1 line:
if exist filename ( del filename ) else ( echo filename not found ) or in 2 lines
if exist filename ( del filename ) else ( echo filename not found ) 2 lines variation
if exist filename ( del filename ) else ( echo filename not found ) etc...
Comments
Post a Comment