Reputation: 15397
As an example, I created a batch file named concatenate.bat
:
@echo off
set foo=%1\bar
echo %foo%
When I run concatenate.bat "C:\somewhere\with spaces"
I want foo to output:
"C:\somewhere\with spaces\bar"
But instead I get:
"C:\somewhere\with spaces"\bar
I also tried: set "foo=%1\bar"
Which outputs: "C:\somewhere\with spaces"\bar
What's the correct way to do this?
Upvotes: 5
Views: 11428