Better use an extra
@
in front of the echo %~
, as otherwise the prompt will vanish.