I've got the following code:
set "alpha=!alpha:%%~nxA=!
set "data=!data:%p2_dir%=!
which works regardless of what %p2_dir% value is,
now here's my problem, I would like to remove !alpha! from !data! and store it in a variable called dwa.
Example:
alpha=aaa\bbb\
data=aaa\bbb\ccc
dwa=ccc
in other topics they want to remove a variable like %substring% not !substring!
the problem is, since I've got 2 !var! variables I cannot use the following command:
"dwa=!data:!alpha!=!"
otherwise it returns
data:=
I tried sending values of !alpha! and !data! in a txt file then saving it using
set /p alpha2=< alpha.txt
but the result is still the same: alpha2 will be saved as !alpha2!
How can I do this?