Search found 3 matches

by aecnrn
22 Jun 2018 23:09
Forum: DOS Batch Forum
Topic: LABEL Being Processed without GOTO or CALL
Replies: 13
Views: 12491

Re: LABEL Being Processed without GOTO or CALL

Squashman wrote:
22 Jun 2018 22:55
You need to put an EXIT /B or GOTO :EOF before the label :ERRORMAPDRIVE.
That works perfectly. Thank you Squashman and Dbenham!
by aecnrn
22 Jun 2018 21:34
Forum: DOS Batch Forum
Topic: LABEL Being Processed without GOTO or CALL
Replies: 13
Views: 12491

Re: LABEL Being Processed without GOTO or CALL

Actually you probably want EXIT /B (terminate the batch file without killing the command process) instead of EXIT (kills the entire command process and closes the console window). EXIT /B is functionally identical to GOTO :EOF Won't that kill the loop though? Say if EXIT /B is specified at the end ...
by aecnrn
22 Jun 2018 17:50
Forum: DOS Batch Forum
Topic: LABEL Being Processed without GOTO or CALL
Replies: 13
Views: 12491

LABEL Being Processed without GOTO or CALL

I have small batch that will try to map a migration folder on remote computers. My :ERRORMAPDRIVE label is being processed even it was not called or told to goto. I tested with 1 valid IP, it was successfully mapped, but the batch somehow still process the label making my error log is inaccurate. Ca...