Hi Everyone,
In the snippet below, "-4" serves as the index for the Right String function provided on this site. Is there a way to replace this constant with a variable such as "indx", the value of which may be -4? Simply replacing "-4" with "%indx%" does not work, and my search for a solution has not been fruitful.
SCRIPT:
set str=politic
echo.%str%
set str=%str:~-4%
echo.%str%
OUTPUT:
politic
itic
Thanks,
Andy
Right String with variable index
Moderator: DosItHelp