Windows batch
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
- Using batch parameters
- Command-line reference A-Z For tylda parameters look for FOR
- What does %~d0 mean in a Windows batch file?