Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Done Option for case-sensitive string comparison in IF command (for CMD compatibility)

Aug
1
0
For example, consider the simple code below.

Code:
if abc == ABC echo this should never match

Under CMD and even DOS' command prompt, the above condition will never be true. i.e. the default string comparison is case-sensitive. However, the default string comparison in Take Command and TCC is case-insensitive instead of case-sensitive. So the above condition will evaluate to true. Many of my existing batch files became erratic and are not usable in Take Command and TCC because of this.

So, my suggestion is to add an INI directive to set the default string comparison mode for the IF command. Let it be set to case-insensitive as default so that existing Take Command / TCC users won't be affected. And while at it, make the IF command's /I switch functional when the string comparison mode is set to case-sensitive.
 

Similar threads

Back
Top