How to compare two substrings or measure their length

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: How to compare two substrings or measure their length

#16 Post by Ed Dyreen » 11 Jan 2012 11:14

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. . .

admin
Site Admin
Posts: 129
Joined: 31 Dec 1969 18:00
Location: US

Re: How to compare two substrings or measure their length

#17 Post by admin » 16 Jan 2012 00:36

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.

alan_b
Expert
Posts: 357
Joined: 04 Oct 2008 09:49

Re: How to compare two substrings or measure their length

#18 Post by alan_b » 16 Jan 2012 01:10

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

Post Reply