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

Aug 31, 2017
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.
 

rconn

Administrator
Staff member
May 14, 2008
12,344
149
Take Command v21 will default to case sensitive IF comparisons if you set the CMD Syntax option.

However, I've never actually seen a case where a case sensitive search is desirable or necessary. Do you have an example of something you're doing that needs this?
 
Similar threads
Thread starter Title Forum Replies Date
R Done Find in screen buffer - case sensitive 'option' Suggestions 2
G Declined Add option to turn on file name case sensitivity Suggestions 6
vefatica Done Option to suppress blank lines in WMIQUERY Suggestions 1
M Done SFTP with a public key auth option Suggestions 2
R Option to add tcc to Bash profile Suggestions 1
vefatica INI option to disable everything GUI ... Suggestions 7
D Suggestion: VIEW option to open VIEW over tab window but not keep it there Suggestions 0
D Done Suggestion: Add VIEW option to open in same position as current window Suggestions 0
Fross Done Option to screen center msgbox Suggestions 2
P Done Have option not to pause TCMD console output when mouse is clicked elsewhere Suggestions 0
D Done BDEBUGGER: add cmdline option to set a breakpoint at a given line Suggestions 0
vefatica Done PAUSE: option to overwrite the prompt Suggestions 2
A Declined Enhance OPTION command functionality Suggestions 2
R Declined Install option: Add File Explorer Run As Adminstrator option Suggestions 14
Charles Dye Done TCEDIT: Command-line option to print files Suggestions 2
Charles Dye Done REGDIR: Hex display option Suggestions 1
Charles Dye TCEDIT: Path search option Suggestions 1
Charles Dye Done @SNAPSHOT: Add option to capture the entire virtual screen Suggestions 0
Charles Dye TASKLIST: Option to mark WOW64 processes Suggestions 0
Charles Dye Done PRINT: Option to set default printer Suggestions 0
A Declined An installer option to control .btm association Suggestions 0
Oz Solomon Done Recycle/Reuse window option for TCMD Suggestions 6
Charles Dye Done Option to prevent recursion into System subdirectories Suggestions 0
R Declined Padding option(s): @Day, @Month, @Doy Suggestions 5
L Completing the UnQLite command's option set Suggestions 0
rps Declined ECHO -- Add spacing option Suggestions 2
rps Declined TPIPE first match & count option Suggestions 2
rps Done Pause /wait option addition Suggestions 1
vefatica Done TIMER ... a partially quiet option Suggestions 1
mfarah "Relative path" option for PDIR Suggestions 1
D Done Add VIEW option to open in same position as current window Suggestions 0
rconn Add option to run programs Elevated from toolbar buttons Suggestions 0
M Done A suggested PDir option... Suggestions 2
Charles Dye Done New TYPE option Suggestions 0
S Declined Add /W(ipe) option to several commands Suggestions 17
S Declined New command or new ACTIVATE option request Suggestions 5
B Done PDIR Field Separator Option Request Suggestions 3
W Done Add an option to control command line parsing Suggestions 7
yjchung Declined Unblocking option for MSGBOX? Suggestions 8
E Declined Add option to use SFN for ComSpec variable Suggestions 8
S Done Enhanced CASE values in SWITCH Suggestions 29

Similar threads