I've often run across the issue where
- I write a .bat file with a label.
- The label is quite valid
- The system throws the error: The system cannot find the batch label specified
I've found this to be an issue of line terminators.
I typically use Notepad++ for editing .bat files. It tends to use Unix line terminators. (Just LF, or \n)
I need to change these to be \r\n (carriage return & new line)
This also seems to impact statement blocks for IF statements.
Example:
IF "%1"=="SomeValue"(
echo %1
echo I just echoed %1
set myvalue=%1
)
I have not carefully tested, but I get the same sort of weird errors for perfectly valid statements. I'm guessing they're related.
Best of luck!
Subscribe to:
Post Comments (Atom)
The Database is not accessible after creating Always On Availability Group
Having created a fully functional SQL Server Always On Availability Group, I connect using SSMS. Upon trying to expand the database, I get ...
-
Most of what we're going to want to look at when you're having production issues are available through DMV's. If granti...
-
BibleGateway.com - Passage Lookup: John 10:7, 9-10 9I am the gate; whoever enters through me will be saved.[a] He will come in and go out, a...
-
I spent a lot of time on this one, and it wasn't clear from examples precisely how the various items should be used together. The form...
No comments:
Post a Comment