Problem with loop and composited new variable
Posted: 04 Sep 2015 06:52
Hi
I would like to add a wow_ to the old variable set "oldV=aaa bbb ccc ddd"
and the finished variable should look like set "newV=wow_aaa wow_bbb wow_ccc wow_ddd"
I get it only to:
How can i get the new variable composited?
I would like to add a wow_ to the old variable set "oldV=aaa bbb ccc ddd"
and the finished variable should look like set "newV=wow_aaa wow_bbb wow_ccc wow_ddd"
I get it only to:
Code: Select all
@echo off
Setlocal EnableDelayedExpansion
set "addV=wow_"
set "oldV=aaa bbb ccc ddd"
for %%i in (%oldV%) do (
set "newV=!addV!%%i"
echo !newV!
REM to new assemble...
)
How can i get the new variable composited?