Jump to content

Batch files: Difference between revisions

From EDM2
mNo edit summary
No edit summary
Line 45: Line 45:
* Roger Orr: [http://www.howzatt.demon.co.uk/articles/21oct96.html Extending OS/2 Batch Files] - Uses very simple REXX files as an example
* Roger Orr: [http://www.howzatt.demon.co.uk/articles/21oct96.html Extending OS/2 Batch Files] - Uses very simple REXX files as an example
* [http://www.jrtinfo.com/Help/Os2Bat.php JaTomes OS/2 Batch file commands] - Fairly exhaustive  
* [http://www.jrtinfo.com/Help/Os2Bat.php JaTomes OS/2 Batch file commands] - Fairly exhaustive  
* [http://www.robvanderwoude.com/batchfiles.php Rob van der Woude's Scripting site] - Has lots of info


[[Category:Programming Languages]][[Category:Batch Files]]
[[Category:Programming Languages]][[Category:Batch Files]]

Revision as of 15:30, 10 April 2015

Batch files are text files that run system commands in a sequence. The OS/2 system recognises two types of batch files on the form of OS/2 files that have the the file extension CMD and DOS batch files that have the extension BAT, but the two types are almost identical except for the fact that the CMD files run inside an OS/2 Command shell and the BAT files inside a DOS Command shell. Most third party command shells have some sort of batch file functionality built in and some have full scripting languages, the 4OS2 and 4DOS replacement shells have an batch language very similar to the OS/2-DOS language but with extensions, the 4OS2/DOS files uses the BTM file extension.

OS/2 Batch file commands

  • CALL
  • ECHO
  • ENDLOCAL
  • EXTPROC
  • FOR
  • GOTO
  • IF
  • PAUSE
  • REM
  • SETLOCAL
  • SHIFT

In addition the above commands a batch script can call any valid OS/2 program. Most commands have formatting and options more like a executable than what you would expect from a scripting language. Some batch file commands can also be used as command line commands.

OS/2 text & programmers editors with OS/2 batch file support

DOS text & programmers editors with OS/2 batch file support

DOS Batch file commands

  • @
  • %?
  • %?%
  • CALL
  • ECHO
  • FOR
  • GOTO
  • IF
  • PAUSE
  • REM
  • SET
  • SHIFT

OS/2 text & programmers editors with DOS batch file support

DOS text & programmers editors with DOS batch file support

Links