Fixed Behavior different than CMD

I have Take Command v18.0

When I run the following batch file:

set start_year=2015
set end_year=2016
echo start_year=%start_year%
echo end_year=%end_year%
set FISC=FY%start_year:~-2%-%end_year:~-2%
echo FISC=%FISC%

the result is:


When I run it under Windows CMD the result is:


How can I write this so Take Command gives me the same result as CMD?
May 20, 2008
Syracuse, NY, USA
v:\> ver

TCC  18.00.30  Windows 7 [Version 6.1.7601]

v:\> set foo=abcd

v:\> echo %foo:~-2%

v:\> cmd /c echo %%foo:~-2%%

Similar threads
Thread starter Title Forum Replies Date
D Pasting Unicode data has different behavior on TCC and CMD Support 2
H @XMLNODES - New behavior? Support 3
Jesse Heines Strange Line Wrapping Behavior Support 14
H Behavior change re piping a string to a Java program Support 1
Jay Sage Baffling Behavior With TPIPE Support 5
P "Set" command behavior - a bug? Support 3
P LOG command behavior Support 3
I Puzzling Behavior of TDRV and DEL Support 2
N Fixed Strange dir behavior Support 6
A Inconsistent @WINPOS // ACTIVATE /POS= behavior Support 0
P Strange mouse behavior with list Support 2
R Find in screen buffer - find next behavior Support 0
D v20 code page behavior changes Support 2
D Strange DO behavior with /O Support 5
Jay Sage Change in Behavior of Activate Command Support 4
jwiede Difference in "FOR /F" behavior (?) Support 1
R Difference in behavior of RMDIR vs. CMD.EXE? Support 5
D Fixed Change in behavior of variable expansion between 16 and 17 Support 3
D Unexpected behavior Support 8
D Bash-like Esc->Backspace behavior Support 4
C ZIP behavior Support 5
Charles Dye Odd behavior after using OPTION "Advanced" tab Support 2
C odd behavior of "dir" Support 0
M How to? Work around an unexpected and very inconvenient behavior of TCC... Support 26
A expected behavior of move /sx Support 14
M WAD A complaint regarding a very irritating TCC installation behavior... (Bug?) Support 4
S Inexplicable behavior difference in nearly identical shortcuts Support 6
Peter Bratton @ping behavior change Support 2
vefatica SHORTCUT behavior (Win7) Support 3
M A question about new behavior that’s a minor irritation… Support 16
M Strange behavior... Support 2
S MSGBOX - inconsistent behavior Support 1
vefatica @REGEX: behavior vs. documentation Support 2
vefatica Strange behavior reloading SHRALIAS sav files. Support 1
S Strange CHKDSK behavior Support 6
Fross Odd IF behavior Support 3
M (Somewhat unbelievable) Do While Behavior/Question Support 1
S RECYCLE /P - unexpected behavior Support 0
J Odd OPTION behavior Support 1
Jay Sage Parameter %$ Different in Aliases and BTMa Support 4
R @select inside alias gives different (insanely small) window Support 7
T Date format date different from cmd Support 7
Jesse Heines webform output different in ver. 26 than ver. 25 Support 2
Joe Caverly DrawVLine results different in TCMD tab and detached TCC Support 11
W If command - different with CMD Support 6
vefatica Are @FILEDATE[file] and @FILEDATE[file,u] ever different? Support 2
J How to? Start TCMD with different configurations Support 3
Glenn Bowes WAD TOOLBAR Button Definations are different v19 to v20 Support 8
M How to? Compare file timestamps accross different file systems... Support 1
C Screens of different size and hidden console Support 8

Similar threads