Re: Multiple variables within dos substring extraction


[ Follow Ups ] [ Post Followup ] [ The EasyDOS Forum ] [ FAQ ]

Posted by humble user on June 25, 2011 at 19:20:45:

In Reply to: Re: Multiple variables within dos substring extraction posted by Valerie on June 24, 2011 at 04:33:11:


set variable=12345
set y=3
set z=1
set X=!variable:~%y%,-%z%!

echo X = %X%

^^this suggestion is appreciated, though does not return the desired results. (At least not in my version of msdos).

echo %X%

::returns-

!variable:~3,-1!

::when it should echo 4



Follow Ups:



Post a Followup (use TAB key to move between boxes - NOT ENTER or RETURN)

Name:
E-Mail:

Subject:

Type your comments in the box below and SUBMIT:


[ Follow Ups ] [ Post Followup ] [ The EasyDOS Forum ] [ FAQ ]