title: Something like a function/method in batch files?
body: <p>is there anything that mimicks a method like one knows it from Java, C# etc.? I have 5 lines of commands in a batch file, those 5 lines are used at more than one place inside the batch file. I can't use a goto, because depending on the errorlevel created by those 5 lines I have different actions that follow. I tried putting my 5 lines inside a batch file 5lines.bat, but the original batch file original.bat only calls 5lines.bat and doesn't execute the commands after the call to 5lines.bat ): That's how my original.bat looks like:</p>
  
  <pre><code>5lines.bat
  echo this gets never called, how to make sure this gets called?
  </code></pre>
  
  <p>There's no exit or something like this in 5lines.bat! How can I make sure the line after 5lines.bat gets called?</p>