Set Command question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to use a variable to set the beginning of a substring in a set
command:

set mon=%mon:~ %dtenum%,3%

where dtenum is itself an environment variable. as in the following:

set dteStr=%date:~4,2%
set /A dtenum=( %dteStr% - 1) * 3
set mon=JanFebMarAprMayJunJulAugSepOctNovDec
set mon=%mon:~ dtenum,3%
 
dino said:
I am trying to use a variable to set the beginning of a substring in a set
command:

set mon=%mon:~ %dtenum%,3%

where dtenum is itself an environment variable. as in the following:

set dteStr=%date:~4,2%
set /A dtenum=( %dteStr% - 1) * 3
set mon=JanFebMarAprMayJunJulAugSepOctNovDec
set mon=%mon:~ dtenum,3%

And what's the question?
 
Back
Top