Software >> OS >> Windows >> Command Line >> How to remove double quotes " enclosing the value of an environment variable

eg. if var="foo bar" then echo %var gives "foo bar" but echo %~var gives foo bar