Welcome!

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

SignUp Now!

Fixed Behavior different than CMD

Aug
16
0
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:

FISC=FY-

When I run it under Windows CMD the result is:

FISC=FY15-16

How can I write this so Take Command gives me the same result as CMD?
 
Similarly,
Code:
v:\> ver

TCC  18.00.30  Windows 7 [Version 6.1.7601]

v:\> set foo=abcd

v:\> echo %foo:~-2%
ECHO is OFF

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

v:\>
 

Similar threads

Back
Top