Page 2 of 2

Re: How to compare two substrings or measure their length

Posted: 11 Jan 2012 11:14
by Ed Dyreen
dbenham wrote:The purpose of SETLOCAL DisableExtensions is to put CMD.EXE into a mode where it attempts to be compatible with the old COMMAND.COM, which did not support GOTO :EOF or EXIT /B. (Among other things)
We used to add :EOF support, by explicit labeling :)

Code: Select all

@echo off &setlocal disableExtensions

goto :EOF
echo.oopsy

:EOF as label compatible with all Windows OS, must be last block in batch !
echo.lucky luke.

pause
exit

Code: Select all

lucky luke.
Druk op een toets om door te gaan. . .

Re: How to compare two substrings or measure their length

Posted: 16 Jan 2012 00:36
by admin
Alan, at the top left of this forum page you can now find a DosTips.com link that takes you back to the home page.

Re: How to compare two substrings or measure their length

Posted: 16 Jan 2012 01:10
by alan_b
admin wrote:Alan, at the top left of this forum page you can now find a DosTips.com link that takes you back to the home page.

Thanks, It is working well

Regards
Alan