title: How would you mimic a function in a normal DOS Batch file?
body: <p>This question is basically about how to mimic the function ability in batch files within the file itself for MS-DOS/Windows Command Prompt (minus extensions). In Command Prompt, with extensions, you could simply first call <code>setlocal enableextensions</code> at the beginning of the batch file and then call the function with <code>call :function params</code>, which would call it just like you would in most other languages (e.g. <code>function(params)</code>). This isn't as easy in DOS and the like (FreeDOS, etc.) because of the lack of command prompt extensions introduced in Windows XP.</p>