The system cannot find the batch label specified

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
James
Posts: 1
Joined: 11 Feb 2020 10:03

The system cannot find the batch label specified

#1 Post by James » 11 Feb 2020 11:07

cmd.exe has strange bug of not finding label.

https://github.com/SSCLI/sscli20_20060311
has a file buildall.cmd.

This file stops with the following error message at line 108: goto :BootstrapDone

The system cannot find the batch label specified - BootstrapDone

At line 138 there is the label it is finding :BootstrapDone

If you insert 10 or more characters between line 108 and line 138, this error does not show.
If you insert less than 10 characters, this error occurs.

For example, you can add comments in one of blank lines between line 108 and line 138

rem 56789
rem 567890

The first comment shows error, the second comment prevents error.

buildall.cmd file is made with LF, not CR/LF.
Attached is a reduced buildall.cmd file for you to experiment what I said.
buildall.cmd.txt
(1.57 KiB) Downloaded 10 times

jeb
Expert
Posts: 943
Joined: 30 Aug 2007 08:05
Location: Germany, Bochum

Re: The system cannot find the batch label specified

#2 Post by jeb » 11 Feb 2020 11:31

Hi James,

my best guess is that your line endings are LF-only.
Convert them to CR/LF and it should work !
Probably a side effect of your git commit rules, how to handle line endings (autocrlf).

jeb

Post Reply