The code below is related to batch files (command prompt). My problem is the part of the code that says current value is %~1
doesn't actually display the value of %~1
(I would like it to say string01 or string02) am not too sure how to do this. I have looked around but cannot wrap my head around this simple problem.
@echo off
goto :MainFunction
:Func01
echo.
echo Running Func01
echo Variable %~1 current value is %~1
echo.
echo Set new value for Variable %~1:
set /p %~1=
goto :eof
:MainFunction
echo This is the main function!
set Var01=string01
set var02=string02
echo Var01 is equal to %Var01%
echo Var02 is equal to %Var02%
call :Func01 Var01
call :Func01 Var02
echo Var01 is now equal to %Var01%
echo Var02 is now equal to %Var02%
goto :eof