greenoldman
greenoldman

Reputation: 21052

How to combine two variables directly in batch file?

I am writing simple batch file as post-build action in Visual Studio and I cannot get rid of quotes which are added when I am combining two variables. The code looks like this:

set SolutionDir=%1
set ConfigurationName=%2

set AltSourceDir=%SolutionDir%\%ConfigurationName%

echo "%AltSourceDir%"

In the point of merge I get quotation marks:

""D:\WORK\Extractor\"\"Release""

How to merge them directly?

Upvotes: 0

Views: 678

Answers (1)

user5721973
user5721973

Reputation:

%~1 removes quotes. See call /?.

Upvotes: 3

Related Questions