||One might say DOS is obsolete, other`s might just wonder why it`s still supported out-of-the-box
in all Windows Operating Systems. This list of basic features may help understand.
||This section is yet to be written.
||An executing DOS batch script is aware about the name and location of its own source file via
the %0 batch parameter. This allows a batch to parse its own source file and change the
execution path based on the parsing result. This is useful for e.g:
- Storing configuration data or meta within the DOS batch and extract them file at runtime.
- Storing data blocks within the DOS batch file and extract them at runtime.
||A batch file that is executing can modify itself with immediate effect. As it executes it
can build the next command to be executed and append the new command to itself. This is useful for e.g:
- Creation and execution of DOS code on the fly where as the created code becomes permanent part of the batch file itself.
- Allows writing adaptive DOS Batch files
||In DOS a variable is simply a place holder for a piece of command line. At runtime a
variable is simply being substituted by its string content. That’s why the string content
can be a value, a command, partial value, a partial command or a mix of them. In case of
substituting a variable to a command, this command to be substituted can use variables
itself. This opens up a lot of space for creativity, e.g.:
See also string manipulation.
- Handling DOS code as data until execution
- Creation and execution of temporary DOS code on the fly