Re: Multiple variables within dos substring extraction


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

Posted by SpywareDr on June 30, 2011 at 04:19:21:

In Reply to: Re: Multiple variables within dos substring extraction posted by Valerie on June 29, 2011 at 07:20:42:

: Yes but Humble User omitted the Setlocal
: Enabledelayedexpansion line which I included in
: my original response. If he ran the script he
: posted then it would not work due to the
: omission.

Run your complete original on XP and/or 7 and post the results.

Here's what I see in XP:

--[begin screencut]--
setlocal enabledelayedexpansion


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

echo X = %X%
X = !variable:~3,-1!
--[end screencut]--

(And the prompt has been eliminated).





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 ]