Windows batch

From Ever changing code
Revision as of 16:33, 27 June 2014 by Pio2pio (talk | contribs)
Jump to navigation Jump to search

IF and ELSE

The else needs to be on the same "line" as the if. From IF /? 'The ELSE clause must occur on the same line as the command after the IF.'
if "zz"=="TRUE" (
    copy /a zz + /a ee=/a zz
) else (
    copy /a e + /a %TMP%=/a e
)


Text manipulation

  • color 0a - changes text to green
  • mode con: cols=80 lines=50 - changes cmd.exe window, no scroll available, type mode to display the current settings

References