Batch, The system cannot find the batch label specified
Andrew Mclaughlin
I have a batch script with a function called :DispLogo in it, however, when I call it states The system cannot find the batch label specified: DispLogo. It is 100% there. I've tried renaming it with no success. I think it has to do with line breaks since I enabled viewing all characters in notepad++ and this is what I see in most of my files:
Each new line has CR and LF. However, on the file in question, I see this:
As you can see, this file only has the LF. How can I fix this?
1 Answer
replace \n with \r\n in your script to fix the LF
- \n is the line ending (LF)
- \r is carriage return (CR)
- \r\n = CRLF