How to? A very simple question re. the current line number in a batch file...

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#1
Is there any way to get the line number of the currently executing statement in a batch file? Something like "blah blah blah error on line 25 in batch file abcdef", for instance. I was thinking something like an internal variable ("%_LineNumber", for example) but searching the docs I'm not finding anything...

- Dan
 
#3
Thank you, Steve, I'm laughing as I type this!:) I figured it was something as simple as that but I honestly would never have guessed "_batchline". Makes total sense in hindsight, however. Thanks again!