Windows batch file - The system cannot find the batch label specified

后端 未结 6 1109
孤街浪徒
孤街浪徒 2020-12-10 15:46

The Problem

I\'m having a problem with a Windows batch file and labels. I keep getting this error:

The system cannot find the batch label

6条回答
  •  攒了一身酷
    2020-12-10 15:59

    One possibility, although it seems unlikely, is that command extensions aren't enabled, or up-to-date, and this is interfering with call/goto/label behaviour.

    Try:

    echo [%cmdextversion%]
    

    and if it's less than [2] (or empty -- []) then check to see if cmd.exe is being invoked with /e:off, or just run

    cmd /e:on
    

    in the console window where you will run this batch file.

提交回复
热议问题